Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Gamepass to increase walkspeed?

Making a gamepass to increase walkspeed, tried a script - didn't work.

local passId = 905520026 game.Players.PlayerAdded:connect(function() function isAuthenticated(player) return game:GetService("GamePassService"):PlayerHasPass(player, passId) end

game.Players.PlayerAdded:connect(function(plr)
     if isAuthenticated(plr) then
repeat wait(0.001) until game.Players.LocalPlayer.Character.Humanoid
         game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = game.Players.LocalPlayer.Character.Humanoid.WalkSpeed + 4
     end
end)

end)

2 answers

humanoid doesnt exist in game.Players

It does exist in Workspace.

Yes thats true, to find the locaplayer in workspace becuz localplayer isnt a thing, you needa do

game.Workspace:FindFirstChild(game.Players.LocalPlayer.Name)

Anyways heres the script, hope it works

local localplayer = game.Workspace:FindFirstChild(game.Players.LocalPlayer.Name)
game.Players.PlayerAdded:connect(function(plr)
     if isAuthenticated(plr) then
repeat wait(0.001) until localplayer.Humanoid
         localplayer.Humanoid.WalkSpeed = localplayer.Humanoid.WalkSpeed+ 4
     end
end)

if this works accept my answer so i can get reputation :)

This discussion is preserved as it was. New answers, comments, and votes are closed.