Group Trail Help

So I have a Gui where players click different trails and depending on their rank they unlock a trail when they click it fires a RemoteEvent that adds the trail to them how can I check if they are in a group and give them a trail if they are?

1 Like

Perhaps this link will help you.
https://developer.roblox.com/en-us/api-reference/function/Player/IsInGroup

"wantedtrail = “LimeTrail”

game.Players.PlayerAdded:Connect(function(newPlayer)
script.Parent.MouseButton1Click:Connect(function()

	if newPlayer:IsInGroup(9913544) then                    
		
		workspace.Events.Trail:FireServer(wantedtrail)
		
	end	
end)

end)
"

1 Like

Thank you for that snippet. Does it work?

2 Likes