while true do wait (1) script.Parent.Text = "Spinning." wait (1) script.Parent.Text = "Spinning.." wait (1) script.Parent.Text = "Spinning..." if game.Workspace.YesOrNo.Value == 1 then script.Parent.Text = "Congratulations!" break end
It would only say "Congratulations!" after the last "Spinning..." How do i make it do it as soon as the YesOrNo.Value is 1 and not wait?
I'm assuming you're using an IntValue. From the Wiki:
Description: Fired whenever the Value of the IntValue is changed.
-- Put this outside of your while loop game.Workspace.YesOrNo.Changed:Connect(function(changedValue) if changedValue == 1 then script.Parent.Text = "Congratulations! You one!(pun intended)" end end)