No errors, and not working

There is still more this script, what is not working is that the system is not team locked for some reason. This is a server script for firing a local script in StarterPlayerScripts.

QueueBuzz = function(plr, pc)
		if not plr or not pc or plr.Team.Name ~= "Medical Staff" then return end

		local ticket = getTicketFromRoom(pc)
		if ticket then
			RS.QueueBuzz:FireClient(ticket.plr, pc)
		end
	end,

Could you show the entire scripts/concept?

Also, I see you named a function and a remote in the same name , please avoid it

It technically works, just not team locked.

It’s quite a long script, do you want me to show the top or where?

QueueBuzz = function(plr, pc)
	if not plr then return end
	if not pc then return end
	if not plr.Team then return end
	if plr.Team.Name ~= "Medical Staff" then return end

Might be worth printing plr and pc just to ensure that they’re not nil.

2 Likes

Doesn’t work, I added printing statements, they printed, but I wasn’t on the Medical Staff team.

Then the team’s name must not be matching the string value being checked in the script.