ZensStarz
(ZenDolla)
January 2, 2022, 1:28am
#1
So, basically, I want to delay my TweenPosition around one second each time. Currently I just remade my script from previous times.
Circle.MouseEnter:Connect(function()
while true do
wait(1)
script.Parent.MovingCircle:TweenPosition(
UDim2.new(Randomzier:NextNumber(0, 0.962),0 ,Randomzier:NextNumber(0, 0.285),0),
Enum.EasingDirection.Out,
Enum.EasingStyle.Linear,
5,
false,
nil
)
TW:Pause(1)
end
end)
mylil = Circle.MouseLeave:Connect(function()
GUIS.Enabled = false
end)
(Side topic, if you wanna answer, would this be better done in a module since I’m using this as a form of progression in a game?)
1 Like
Xacima
(Xacima)
January 2, 2022, 1:54am
#2
You can define a number that increases everytime they click it, by one second everytime.
ZensStarz
(ZenDolla)
January 2, 2022, 2:01am
#3
How would I define it to make it where the number actually stops the script for a second? Would I just use the Wait() function?
Xacima
(Xacima)
January 2, 2022, 2:07am
#4
Why would you want to stop the script in the first place?
I don’t get your logic at the moment, please elaborate.
ZensStarz
(ZenDolla)
January 2, 2022, 3:53am
#5
At the moment, the ball I have just moves constantly. What I want it to do instead is wait a second or two so I can update the value for the progression, then have it move again.
Jumpathy
(tyler)
January 2, 2022, 4:14am
#6
Do you mean something like:
And then you could use
tween:Stop()
tween:Play()
to your liking?
ZensStarz
(ZenDolla)
January 2, 2022, 4:01pm
#7
Yeah, that’s what I was trying, but I wasn’t sure if I put the same function in a variable and use it for both the tween info and property table. I fixed it nevertheless, my wait was just acting weird in the moment.