Self Solved Admin only speed not working. Any help? I accept answers!
Asked by
M9F 94
4 years ago Edited 4 years ago
So I'm testing out a script that is only supposed to give a player speed if their name is in the code. I've never messed with any code like this and I've had a few attempts with no luck. Any help would be awesome!
01 | local object = script.Parent |
02 | local player = workspace |
03 | local allowedPlayers = { "M9F" } |
05 | local function giveSpeed(hit) |
06 | if hit.Parent:FindFirstChild( "Humanoid" ) then |
07 | if hit.Parent = = allowedPlayers then |
09 | hit.Parent.Humanoid.WalkSpeed = 50 |
13 | object.Touched:Connect(giveSpeed) |