Hi!
So I’m trying to make a simple startup “title screen” type thing with a solid colour background, a logo which fades in, and then the background + logo both fade out. This works perfectly in a Script when viewed on the server through studio testing, however doesn’t replicate to the client, and when the exact same script is placed inside a LocalScript in ReplicatedFirst the tweens just… don’t play.
Here’s the script:
local StarterGui = game:GetService("StarterGui")
local SoundService = game:GetService("SoundService")
local TweenService = game:GetService("TweenService")
local startupSequence = StarterGui.StartupSequence
local music_remnants = SoundService.Music.Remnants
local background = startupSequence.Frame
local unsourcedLogo = startupSequence.UnsourcedLogo
local logoFadeInfo = TweenInfo.new(
2, --Seconds
Enum.EasingStyle.Cubic, --EasingStyle
Enum.EasingDirection.Out, --EasingDirection
0, --Repeats
false, --Reverse
0 --Delay
)
local screenFadeInfo = TweenInfo.new(
2, --Seconds
Enum.EasingStyle.Cubic, --EasingStyle
Enum.EasingDirection.In, --EasingDirection
0, --Repeats
false, --Reverse
0 --Delay
)
local logoFadeIn = TweenService:Create(unsourcedLogo, logoFadeInfo, {ImageTransparency = 0})
local logoFadeOut = TweenService:Create(unsourcedLogo, logoFadeInfo, {ImageTransparency = 1})
local screenFadeOut = TweenService:Create(background, screenFadeInfo, {BackgroundTransparency = 1})
-- Sequence
task.wait(3)
music_remnants:Play()
task.wait(4)
logoFadeIn:Play()
task.wait(7.5)
screenFadeOut:Play()
logoFadeOut:Play()
The music here plays, so it’s not like the script isn’t running. The tweens just don’t play.
I have no idea why this is, so any help would be appreciated.