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

IsInGroup help? [Script Included]

Its supposed to change your speed to 21 if your in a group, doesn't work, help?

function onPlayerEntered(newPlayer)
if game.Players[newPlayer.Parent.Name]:IsInGroup(950346) == true then
newPlayer.Character.Humanoid.WalkSpeed = 21
end
end
game.Players.PlayerAdded:connect(onPlayerEntered)

Would this work?

4 comments

0

What is "human"

0

" == true" is not neccessary. "if" checks if the the statement between "if" and "then" is true. And yeah, what is "human"?

0

Would it work now that I changed human to newPlayer?

0

Try testing it

1 answer

✓ Accepted answer

This is just my guess, but this should work!

function onPlayerEntered(newPlayer)
if newPlayer:IsInGroup(950346) then
newPlayer.Character.Humanoid.WalkSpeed = 21
end
end
game.Players.PlayerAdded:connect(onPlayerEntered)

1 comment

0

Works, thanks!

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