Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Something Wrong With Walkspeed Gamepass... Anyone know why?

Asked by 6 years ago

Here is my script, I don't see much wrong with it. Does anyone know why this might not be working?

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        if game:GetService("GamePassService"):PlayerHasPass(player, 4583498) then
            character:WaitForChild("Humanoid").WalkSpeed = 55
        end
    end)
end)

Makes 0 sense, should be working...

1 answer

Log in to vote
1
Answered by 6 years ago
Edited 6 years ago

I've had this issue recently, it was fixed when I switched gamepassservice to marketplaceservice. The script should be fixed if you have it like this:

game:GetService("Players").PlayerAdded:Connect(function(Player)
    if MarketplaceService:UserOwnsGamePassAsync(Player.UserId, 4583498) then
        Player.CharacterAdded:Connect(function(Character)
            Character:WaitForChild("Humanoid").WalkSpeed = 55
        end)
    end
end)
0
I'll try this, thanks Sir. If it works I'll verify this answer. andyad13 74 — 6y
0
It would be better to only connect this event if they have the game pass rather than checking each time. User#5423 17 — 6y
0
I agree. Let me edit the response. SystemFormat 149 — 6y
Ad

Answer this question