Hi there.
For some reason, when this runs, it completely skips the two seconds that the tween is supposed to be running for. it does it instantaneously. Any ideas?
mouse.Button1Down:Connect(function()
animTrack:Play()
stop = false
while stop == false do
wait()
for _,iore in ipairs(ore) do
if cursorObject.Parent.Name == iore and magnitude <= 10 and hit == false and cursorObject.Parent.Health.Value > 0 then
hitting = true
hit = true
local current = cursorObject.Parent.Name
local currenthealth = replicatedstorge:WaitForChild("Health"):InvokeServer(current)
local function executeAfter(complete)
print("hello")
replicatedstorge:WaitForChild("Mining"):FireServer(cursorObject,damage)
progress.Size = UDim2.new(0,0,1,0)
hit = false
end
local tween2 = progress:TweenSize(
UDim2.new(1,0,1,0),
Enum.EasingDirection.Out,
Enum.EasingStyle.Linear,
false,
2,
executeAfter
)
end
end
end
end)

3 comments
Wow. I cannot believe I missed that. Thank you so much!
No problem, friend.
Hey! Another thing, how would I go as to stop the tween when mouse.button1up occurs? Thanks again!