I’m trying to play tweens to show my UI when the player joins and respawns. This is my script, but for some reason it doesn’t work. There is nothing in output
local tweenService = game:GetService("TweenService")
local player = game.Players.LocalPlayer
local orderText = player.PlayerGui:WaitForChild("Starter").Background.Main.Order
local playBttn = player.PlayerGui:WaitForChild("Starter").Background.Main.Play
local shopBttn = player.PlayerGui:WaitForChild("Starter").Background.Main.Shop
local rose = player.PlayerGui:WaitForChild("Starter").Background.Main.Order.rose
local orderInfo = TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.In)
local playInfo = TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.In)
local shopInfo = TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.In)
local roseInfo = TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.In)
local playGoal1 = {Position = UDim2.new({0.352, 0},{0.401, 0})}
local shopGoal1 = {Position = UDim2.new({0.352, 0},{0.625, 0})}
local orderGoal1 = {TextTransparency = 0}
local roseGoal1 = {ImageTransparency = 0}
local playGoal2 = {TextTransparency = 1}
local shopGoal2 = {TextTransparency = 1}
local orderGoal2 = {TextTransparency = 1}
local roseGoal2 = {ImageTransparency = 1}
local orderTween1 = tweenService:Create(orderText, orderInfo, orderGoal1)
local orderTween2 = tweenService:Create(orderText, orderInfo, orderGoal2)
local roseTween1 = tweenService:Create(rose, roseInfo, roseGoal1)
local roseTween2 = tweenService:Create(rose, roseInfo, roseGoal2)
local playTween1 = tweenService:Create(playBttn, playInfo, playGoal1)
local playTween2 = tweenService:Create(playBttn, playInfo, playGoal2)
local shopTween1 = tweenService:Create(shopBttn, shopInfo, shopGoal1)
local shopTween2 = tweenService:Create(shopBttn, shopInfo, shopGoal2)
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
orderTween1:Play()
roseTween1:Play()
task.wait(2.5)
playTween1:Play()
task.wait(1.5)
shopTween1:Play()
end)
end)
it’s a localscript inside StarterPlayerScripts