So I'm seeing this blue underline appear under character and player in this code:
if **character**.Head:FindFirstChild("BillboardGui") then local clonedgui = billboardgui:Clone() clonedgui.TextLabel.Text = "Guest" clonedgui.TextLabel.TextColor3 = Color3.fromRGB(75,171,144) clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head end if **player**:IsInGroup(5330388) then local clonedgui = billboardgui:Clone() clonedgui.TextLabel.Text = "Trainee" clonedgui.TextLabel.TextColor3 = Color3.fromRGB(0,230,255) clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head end
I've put asterisks around the character and player where the blue underline appears. If anyone knows how to solve this, please answer! It'd mean a lot for myself and the game I'm working on!
lets do some steps: 1-- have you checked if you are putting this code in a function?
2-- did you put "local" infront when you were creating the "character" and "player" variables? (will not let functions that do not have "character"/"player" identified)
3-- did you create/identify the variables "character" and "player"?
W001:Unknown global
means that you are trying to use a variable a reference has not been created for.
An example that would produce W001: Unknown global
would be:
local a = 10 function sum() return a + b -- we have not declared a value for b, yet try to use it end
To fix this, you need to make define player
and character
somewhere in your script.