local GroupId = 2520927 local player = game:GetService("Players").LocalPlayer.Character local plr = game:GetService("Players").LocalPlayer game.Players.PlayerAdded:connect(function() if plr:IsInGroup(GroupId) then player.Humanoid.WalkSpeed = player.Humanoid.WalkSpeed +8 player.Humanoid.MaxHealth = player.Humanoid.MaxHealth +50 end end)
First of all you can only use
game.Players.LocalPlayer
in a LocalScript, though you can't listen for the
game.Players.PlayerAdded
event in a LocalScript.
Also, I'm not sure if you can edit the MaxHealth and WalkSpeed using a LocalScript.
You could take a look at RemoteEvents, or just use a server script for all of it.