New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

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

Asked by
Auxigin -5
10 days ago
Edited 10 days ago

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

Log in to vote
1
Answered by 10 days ago
Edited 9 days ago

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)
1
Please Accept My Answer If It Worked. EnzoTDZ_YT 314 — 10d
1
Did you mean to put stupid = true after the wait(1)? palav 104 — 9d
1
nope ill fix that EnzoTDZ_YT 314 — 9d
0
Sorry, the end) still has a red line under it :( Auxigin -5 — 9d
View all comments (2 more)
0
ok 1 moment ill check it again EnzoTDZ_YT 314 — 9d
0
Try now i checked and it definatly works now EnzoTDZ_YT 314 — 9d
Ad

Answer this question