if i play i wont get walk speed :(
script: local id = 14645123
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)
First off, Walkspeed should be WalkSpeed. Second, you cant confirm that the player is buying it unless you know the player. Hope this works :)
local id = 14645123 BuyEvent.OnServerEvent:Connect(function(Player) game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased) if purchased and id == ido and plr == Player then plr.Character.Humanoid.WalkSpeed = 40 end 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)
Howdy, there are two possibilities that your script isn't working
You are setting both WalkSpeed's to 40, purchasing it or not.
It is waiting for the plr or the humanoid but can't find it.
Do you own the gamepass?