Cawlonee, I got the error: Workspace.Script:8: function arguments expected near ':'
The script is supposed to check if a player has the gamepass, and then change their walkspeed to 30. It's not changing the walkspeed.
local id = 216653360
game.Players.PlayerAdded:connect(function(newplayer)
local player = newplayer.Character
local humanoid = player:WaitForChild("Humanoid")
if game:GetService("GamePassService"):PlayerHasPass(player, id) then
humanoid.Walkspeed = 30
end
end)
Script I made that worked:
local id = 216653360
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
if game:GetService("GamePassService"):PlayerHasPass(player, id) then
character.Humanoid.WalkSpeed = 25
end
end)
end)
