I have a base for my group that has walls around it.
I have 2 SpawnLocations, one inside the walls (for members) and one outside the walls (for nonmembers). I know I would probably use IsInGroup
to tell which spawn is for which group of people, but not how to define the SpawnLocations.
My guess is it would be something like
if player IsInGroup then --code for spawning them in a certain place
That's all I know, and the stuff I don't know is the stuff I need help with.
What you're looking for are Teams. (heres the link to the wiki page) Once you have your teams and assign each spawn point to them, you should have the following script
local GroupID=0--replace '0' with the group's ID number game:GetService'Players'.PlayerAdded:connect(function(plr) if plr:IsInGroup(GroupID) then plr.TeamColor="Bright red"--replace 'Bright red' with the color of the member's team end end)