Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why am I getting this error under the equal sign?

Asked by 5 years ago

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?

0
also side note: = sets a value, for conditions, use == (if a == 5 then...) fanofpixels 718 — 5y
0
Thanks, fanofpixels. thatvaultboy111 -3 — 5y
0
Sorry if this seems simple to you, I'm still new to this. :P thatvaultboy111 -3 — 5y

1 answer

Log in to vote
0
Answered by
green271 635 Moderation Voter
5 years ago
Edited 5 years ago

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)
0
Thanks man, really helps! :D thatvaultboy111 -3 — 5y
Ad

Answer this question