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

Why does my event not require an end) and when I play it doesn't work?

stupid = true script.Parent.Touched:Connect(function(player) if stupid == true then do stupid = false script.Parent.Position = Vector3.new(-65.597, 0.36, 1.5) wait(4) script.Parent.Position = Vector3.new(-65.597, 0.672, 1.5) stupid = true wait(1) end end)



This is my button script with a reset and it doesn't work? The event doesn't sense an end and the end) has a red line under it and nothing works... I might look stupid but I'm a new member of this community.

1 answer

✓ Accepted answer

use it as you have your code in the lua block also here is the working version

local stupid = true

script.Parent.Touched:Connect(function(player)
    if stupid == true then
        stupid = false
		script.Parent.Position = Vector3.new(-65.597, 0.36, 1.5)
		wait(4)
		script.Parent.Position = Vector3.new(-65.597, 0.672, 1.5)
		wait(1)
		stupid = true
	end
end)

6 comments

1

Please Accept My Answer If It Worked.

1

Did you mean to put stupid = true after the wait(1)?

1

nope ill fix that

0

Sorry, the end) still has a red line under it :(

0

ok 1 moment ill check it again

0

Try now i checked and it definatly works now

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