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

Can I use Global Functions in if then statements?

Asked by 6 years ago

Hi, I've been trying to make it so when this Global function is true. You can walk through the gate block. It doesn't seem to work, though.

--OpenGate
gate = workspace.gate

if _G.Array == {1,2,10,12} then
    gate.CanCollide = false
    gate.Transparency = 1
end
0
I don't think you can compare an array to an array. You would have to loop through the contents of the array and see if they match. Hellasius 0 — 6y

Answer this question