#Gamepass disappears and Jump Power

101 messages · Page 1 of 1 (latest)

remote pewter
#

how do i firstly make my Double Speed and other gamepasses in my obby stay after i die/respawn and why isnt my JumpPower gamepass working normally

remote pewter
#

local id = 191977353
local m = game:GetService('MarketplaceService')

game.Players.ChildAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
if m:UserOwnsGamePassAsync(player.UserId, id) then
local h = char:WaitForChild('Humanoid')
h.JumpPower = 100
end
end)
end)

#

local id = 191936571

game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
if purchased and id == ido then
plr.Character.Humanoid.WalkSpeed = 40
end
end)

game.Players.PlayerAdded:Connect(function(plr)
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId,id)then
game.Workspace:WaitForChild(plr.Name):WaitForChild("Humanoid").WalkSpeed = 40
end
end)

#

speed works but jump doesnt

#

also idk why it goes away after death

#

its also my first ever game to try and develop on roblox

worthy carbon
worthy carbon
worthy carbon
urban tiger
#

He says do it like

#

Playeradded:Connnect

#

then

#

CharacterAdded

worthy carbon
#

yes

remote pewter
#

game.Players.PlayerAdded:Connect.CharacterAdded(function(plr)

#

so like this?

urban tiger
#

nonononon

#

change

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(chr)
        
    end)
end)
#

like that

remote pewter
#

local id = 191936571

game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
if purchased and id == ido then
plr.Character.Humanoid.WalkSpeed = 40
end
end)

game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(chr)
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId,id)then
game.Workspace:WaitForChild(plr.Name):WaitForChild("Humanoid").WalkSpeed = 40
end
end)

teal fogBOT
#

studio** You are now Level 1! **studio

remote pewter
#

so this should work?

urban tiger
#

yes

#

nonon

#

wait

#

im gonna fix it

remote pewter
#

okay

urban tiger
#

local id = 191936571

game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
if purchased and id == ido then
plr.Character.Humanoid.WalkSpeed = 40
end
end)

game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(chr)
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId,id)then
game.Workspace:WaitForChild(plr.Name):WaitForChild("Humanoid").WalkSpeed = 40
end
end)
end)

#

there you go

#

its have to be another end)

#

to work

#

change

local id = 191936571

game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
    if purchased and id == ido then
        plr.Character.Humanoid.WalkSpeed = 40
    end
end)

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(chr)
        if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId,id)then
            game.Workspace:WaitForChild(plr.Name):WaitForChild("Humanoid").WalkSpeed = 40
        end
    end)
end)
remote pewter
#

it worksss

#

but my jump power still doesnt

#

local id = 191977353

game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
if purchased and id == ido then
plr.Character.Humanoid.JumpPower = 100
end
end)

game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(chr)
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId,id)then
game.Workspace:WaitForChild(plr.Name):WaitForChild("Humanoid").JumpPower = 100
end
end)
end)

#

this is the current script for it i just copied yours

#

but it doesnt work for jump idk why tho

#

as i said im kinda new to all of this

urban tiger
#

use

#

wait

#

its not you

#

its roblox

#

they

#

put JumpHeight

#

instead of JumpPower

#

to activate

#

use the line of

#

game.Workspace:WaitForChild(plr.Name):WaitForChild("Humanoid").UseJumpPower = true

#

this should work

#

wait

#

change

local id = 191977353

game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
    if purchased and id == ido then
        plr.Character.Humanoid.JumpPower = 100
    end
end)

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(chr)
        if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId,id)then
            game.Workspace:WaitForChild(plr.Name):WaitForChild("Humanoid").UseJumpPower = true
            game.Workspace:WaitForChild(plr.Name):WaitForChild("Humanoid").JumpPower = 100
        end
    end)
end)
#

use this

#

this should work

remote pewter
#

it WORKSSS

#

thank you so muchhh

urban tiger
#

No prob man

#

have a nice day

remote pewter
#

u too man

urban tiger
#

but

#

wait

#

there is some prob ther

#

for the first time purchaser

#

it couldnt work cus

#

@remote pewter

remote pewter
#

why not?

urban tiger
#

i gotta do something just one more

remote pewter
#

wait

#

i have something else

#

local mps = game:GetService("MarketplaceService")

script.Parent.MouseButton1Click:Connect(function()
mps:PromptGamePassPurchase(game.Players.LocalPlayer,script.Parent.GamePassID.Value)
end)

#

this

#

in my image button

#

if this helps

urban tiger
#

change

local id = 191977353

game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
    if purchased and id == ido then
        plr.Character.Humanoid.UseJumpPower = true
        plr.Character.Humanoid.JumpPower = 100
    end
end)

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(chr)
        if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId,id)then
            game.Workspace:WaitForChild(plr.Name):WaitForChild("Humanoid").UseJumpPower = true
            game.Workspace:WaitForChild(plr.Name):WaitForChild("Humanoid").JumpPower = 100
        end
    end)
end)
#

now its complete

remote pewter
#

no i thought u meant this cuz u said first time purchase

#

nvm

urban tiger
#

this is the ponw

#

one

#

you should use this

#

and if you have any suggest you can dm me

remote pewter
#

u want to test my game rq?

urban tiger
#

ye why not

#

send me link

remote pewter
#

should be this

#

and spawn is kinda moved rn since im testing levels

#

but its nowhere near complete

urban tiger
#

ok can u join too

remote pewter
#

im in

urban tiger
#

wait im coming

#

ok wait

#

its just login thing

#

sorry for wait

remote pewter
#

np take ur time

teal fogBOT
#

studio** You are now Level 2! **studio

urban tiger
#

its like that

remote pewter
#

ight

#

ye good