here the script:
https://gyazo.com/bd17b1bc767d9346c471ead3ccefa162
as you can see my problem is the the closing of the Winner Frame.
when you watching the video look the Frame Position
in the end its not changing the position.
here the script:
https://gyazo.com/bd17b1bc767d9346c471ead3ccefa162
as you can see my problem is the the closing of the Winner Frame.
when you watching the video look the Frame Position
in the end its not changing the position.
end is in the wrong spot, it should be under the if
loop
can you show me example please if you can?
Its just wrong in all ways, you have an unneeded end
but can you show me how to do it correct?
I’m not going to spoonfeed, someone else can, I already told you what I meant.
Hey there!
I’m not entirely sure what the issue is, but it looks like your debounce isn’t working.
It’s not to do with the end statement mentioned by @ComplexPriorities, but that TweenPosition doesn’t yield. It looks like the debounce is supposed to end after the tween, but TweenPosition doesn’t pause the current thread, so you’d need to either create a tween with TweenService and add a
tween:Play()
tween.Completed:Wait()
or a wait(2) statement underneath the tween. Basically, since TweenPosition doesn’t yield, the debounce turns true but then immediately after turns false again since it isn’t paused to wait until the tween ends.
Hope this helps!
thank you i will try understand and fix it
tweenService:Create([FRAME], [TWEENINFO], {Size = UDim2.new(0, 0,-0, 0)}):Play()
You can replace the tween with this, but you’re going to fix some adjustments.
Alrighty. Let me know if you need anything!
I might be wrong, but I think this still won’t yield the main thread. You’d need to add a
tween.Completed:Wait() for it to yield. Otherwise, this should work.
Yep, because the line of code after the tween still runs
I was going to say about what @thunderbeast208 said, except for the wait.
What he said should work for you, try it .
I suggest you use TweenService instead of wait(2), since wait(seconds) is almost never exact.
But in addition to that, I don’t understand the debounces here, TweenService should be used if you want to yield, but the debounces are not necessary and make it harder to read.
Don’t be afraid that exploiters will change the Value, the changes are not replicated to everyone unless there’s a weak remote event. If exploiters want to mess up their own GUI then that’s their choice, it shouldn’t interrupt you.