[Solved] tool reward for being in the group

Looking at the post I realized that the problem was that I wrote 2 letters e to connect the function.

local Players = game:GetService("Players")
local groupId = 0

Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Conneect(function(character)
           if player:IsInGroup(groupId) then
			 character.Humanoid.WalkSpeed = 25
			 character.Humanoid.JumpPower = character.Humanoid.JumpPower * 3
		end
      end
	end)
end)
1 Like
if player:IsInGroup(groupId) then		
	print("in group")
    local Tool = game:GetService("ReplicatedStorage").TOOLNAME:Clone()
    Tool.Parent = player.Backpack	
end

The script above should work.

if player:IsInGroup(groupId)

This checks if they player is in the group and prints if they are.

local Tool = game:GetService("ReplicatedStorage").TOOLNAME:Clone()

If they are in the group, the tool you want to give them is cloned from ReplicatedStorage.

Tool.Parent = player.Backpack	

This line of code places the tool into the player’s backpack so it can be equipped.

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.