Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a script keep running if GetRoleInGroup is nil?

Asked by 4 years ago

Heyo, so I have my script up and running but there's a tiny problem. Everytime I want to test it I have to spend 20 seconds launching ROBLOX on an alt so I can see the effects on other players. I've tried removing my group requirements so that I can test it in studio, but everytime a player is not in the group, it refuses to run. I've tracked the issue to this line

local PRank  = Player:GetRoleInGroup(Group)

So, if I was in a real server and I was in the local group it'd print out my rank in a different line. But everytime a guest activates the script nothing happens. How do I make it print out "Guest" instead of shutting down?

Answer this question