Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I need help on a group rank spawn?

I need a script where it spawns a specific group rank/role. But everytime I use my script it ends up spawning anyone??

2 answers

I'm not sure if this is what you meant but..

-- locals:
local GroupId = 9218769

game.Players.PlayerAdded:Connect(function(localPlr)
	repeat wait() until localPlr.Character
	local PlayersRank = localPlr:GetRoleInGroup(GroupId)
	if PlayersRank == "Owner" and "Co-owner" then
		localPlr.Character.HumanoidRootPart.CFrame = game.Workspace.TeleportSpawn.CFrame
		print(localPlr, "teleported to secret room")
	end
end)

Change the GroupId to the GroupId you got so it works.

How it works is when the player joins it repeats till their character spawns. Then it gets their Role from the GroupId.

If the Players Role/Rank is Owner or Co-owner then it'll teleport them to this part's CFrame. then it'll print in the server script that the player teleported to a secret room.

(You can add more PlayerRanks by doing "if PlayersRank == "Blah" and "Blah" and "Blah" then" just add another and and yeaa)

If this is what you meant then here you go.

Hey, I made my own one, it works for me hopefully it helps you too!

Group rank spawn: https://www.roblox.com/library/6340593157/Group-rank-spawn

Accept my answer if it works! Make sure you change the rank number and group id for it to work!

This discussion is preserved as it was. New answers, comments, and votes are closed.