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)
Use the CharacterAdded event to give it on every respawn.
local id = 216653360 game.Players.PlayerAdded:connect(function(newplayer) newplayer.CharacterAdded:connect(function(character) local humanoid = character:WaitForChild("Humanoid") if game:GetService("GamePassService"):PlayerHasPass(newplayer, id) then humanoid.WalkSpeed = 30 -- It's WalkSpeed, not Walkspeed end end) end)
If you get anything in the output, tell me and Ill fix any syntax errors.