Red underline under equals sign

My script isn’t working because of the = after VisitorBox.Parent.

Does anyone know a way around this?


local Player = game.Players.LocalPlayer
local VisitorBox = game.ReplicatedStorage.VisitorSpawn

if Player:GetRankInGroup(6098691)==0 then
	if VisitorBox.Parent = game.Workspace then
		script.Parent.Visible = true
	end
end

image

Relational operator (==) for comparisons, = to cast values.

 if VisitorBox.Parent == workspace then end
 -- or even
 if workspace:FindFirstChild("VisitorBox") then end

You’ve already done that above here:

image

Thanks!
I didn’t really put that together!