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

How to fix Button delay?

So when i click my button, there is huge delay, and it is super annoying. Can someone tell how to fix that?

function onButtonClicked()

script.Parent.Position= UDim2.new(0,0,0.007,0)
script.Sound:Play()
wait(0.2)
script.Parent.Position= UDim2.new(0,0,0.0,0)

end

  script.Parent.MouseButton1Click:connect(onButtonClicked)

1 answer

At first look you have an error on line 5 at the wait "(0,2)". It should be wait(0.2)

One thing to note is that errors will completely stop your script.

2 comments

0

i Fixed it. But delay is still there.

0

Remove the wait then!

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