Hello everyone, I have been trying to make a "GroupHandler". Basically this is supposed to give Speed, Health, Gear, and Cash when you are in a certain group.. This following script is what I have so far, the script is in "ServerScriptService" and its a normal Script.
pcall(function() game.Players.PlayerAdded:connect(function(player) if player:IsInGroup(2628023) then local cashmoney = game.ServerStorage.MoneyStorage:WaitForChild(player.Name) cashmoney.Value = cashmoney.Value + 500 player.CharacterAdded:connect(function(char) if char:WaitForChild("Humanoid") then char.Humanoid.MaxHealth = char.Humanoid.MaxHealth + 15 char.Humanoid.Health = char.Humanoid.Health + 15 char.Humanoid.WalkSpeed = char.Humanoid.WalkSpeed + 3 game.Lighting.Minigun:Clone().Parent=player.Backpack end end) local msg = Instance.new("Hint",workspace) msg.Text = player.Name.." joined the game with Ultra V.I.P." wait(2) msg:Destroy() end end)
I am not sure why it isn't working, can you please halp?