Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why am I getting this error under the equal sign?

if Workspace.Torch.DisapearingWood.TorchDoorClickDetector.MouseHoverEnter = true

For some reason, I'm getting an error sign under the equal sign and I'm not sure why. Would someone mind helping me, Thanks?

3 comments

0

also side note: = sets a value, for conditions, use == (if a == 5 then...)

0

Thanks, fanofpixels.

0

Sorry if this seems simple to you, I'm still new to this. :P

1 answer

✓ Accepted answer

You have to connect it to a function. It doesn't return true or false.

game.Workspace.Torch.DisapearingWood.TorchDoorClickDetector.MouseHoverEnter:connect(function()
	-- code here
end)

1 comment

0

Thanks man, really helps! :D

This discussion is preserved as it was. New answers, comments, and votes are closed.