So I’ve recently crashed into a very annoying issue that I am unable to find further information about. So in my game, whenever a round starts, the system will teleport all online players. When a player is teleported I want it to display 2 tweens, one going in and one going out. Problem is that the second tween does not display, though it still outputs and proceeds with the rest of the script.
-
What do you want to achieve?
I want to achieve a transition for whenever a player gets teleported. -
What is the issue?
The Tween displays the first time but doesn’t do anything the second time. It gives me an output but nothing changes -
What solutions have you tried so far?
Searching it up on developer.roblox.com but didn’t seem to help
local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local Image = script.Parent.TransitionCircle
local TransitionBindable = game:GetService("ReplicatedStorage"):WaitForChild("Remotes"):WaitForChild("Transition BindableEvent")
local MinSize = 0
local MaxSize = 2.5
local TimeVar = 3 -- This variable changes how long it takes for the tween
Image.Size = UDim2.fromScale(0,0)
local function ActivateTransition()
TransitionBindable:Fire()
end
local function TweenFunction(Thing, EndSize, Direction, Style, Time)
Tween = Thing:TweenSize(UDim2.fromScale(EndSize,EndSize), Direction, Style, Time)
wait(Time)
end
TransitionBindable.Event:Connect(function()
print("Transition")
script.Parent.Enabled = true
Image.Size = UDim2.fromScale(MaxSize,MaxSize)
TweenFunction(Image, MinSize, Enum.EasingDirection.In, Enum.EasingStyle.Quint, TimeVar)
print("done with first tween")
wait(5)
TweenFunction(Image, MinSize, Enum.EasingDirection.Out, Enum.EasingStyle.Quint, TimeVar)
print("done with second tween")
end)
wait(5)
ActivateTransition()
Basically every time I run it it starts out by showing the first part of the transaction and printing:
done with first tween
then it waits 5 seconds and does not show anything, but prints:
done with second tween
The answer should hopefully be pretty straight forward :’)
Sincerely, Mathe

