Hi everyone, I literally have no idea what's causing this issue. The same function call or whatever worked in a different spot but in this one it didn't work. I'm really confused and any help is appreciated. Here is the relevant code: (an excerpt from main script)

function uGUI(role, name)
	local pRole = role
	local pName = name
	
	local roleGUI = game.Workspace:WaitForChild(pName).Head.OverheadRoleGUI
	local nameGUI = game.Workspace:WaitForChild(pName).Head.OverheadNameGUI

	roleGUI.Role.Text = pRole
	nameGUI.PlayerName.Text = pName
	local r, g, b
	print(localPlayer:GetRoleInGroup(5369028) )
	if localPlayer:GetRoleInGroup(5369028) == "Barista" or localPlayer:GetRoleInGroup(5369028) == "Junior Barista" or localPlayer:GetRoleInGroup(5369028) == "Senior Barista" or localPlayer:GetRoleInGroup(5369028) == "Professional Chef" or localPlayer:GetRoleInGroup(5369028) == "Shift Manager" or localPlayer:GetRoleInGroup(5369028) == "Supervisor" then
		r = 56
		g = 255
		b = 159
	elseif localPlayer:GetRoleInGroup(5369028) == "Cafe Manager" then
		r = 204
		g = 204
		b = 0
	elseif localPlayer:GetRoleInGroup(5369028) == "Developer" or localPlayer:GetRoleInGroup(5369028) == "C.E.O" then
		r = 255
		g = 88
		b = 88
	else
		r = 255
		g = 255
		b = 255
	end
	roleGUI.Role.TextColor3 = Color3.fromRGB(r, g, b)
	nameGUI.PlayerName.TextColor3 = Color3.fromRGB(r, g, b)
	print("Success! Player " ..pName.." has joined with rank".. pRole.. " and their color code id is: "..r.." "..g.." ".." "..b)
end

3 comments

0

the codeblock thing formatted this weird sorry

0

What type of script is it? And where is it located?

0

server script service and server script