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

Can someone correct this code of function expand?

Asked by 4 years ago

I want to make a mask that keeps expanding by 0.1 in length, and as soon as it touches another part, it goes back to 1 in length, and it starts from beginning. I tried to do it but it doesn't work. here is my source code. I would be happy if you could correct it:

function expand("Handle") (Script.Parent.Size.Z) = "length" length + 0.2 end function onTouch script.Parent:FindFirstChild("Part") end while onTouch = false expand if onTouch = true then length = "1" return end end

0
please use the lua code format provided so we can actually make sense of your code Shrilleh 68 — 4y
1
by what i see in the text i see a while loop without a "do", the expand function being called without its parenthesis, and the if statement is not written correctly due to you not using a comparison rower86 35 — 4y

Answer this question