Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Why is the tween not playing?

Asked by 2 days ago

The Function "StartLoad" runs since it changes the GUI to enabled. Although, there is a tween for the loadingRing. This doesn't play. The code below is the code i'm having problems with:

local TweenService = game:GetService("TweenService")

local function StartLoad()
    script.Parent.Parent.Parent.MenuFade.Enabled = false
    script.Parent.Parent.Parent.Menu.Enabled = false
    script.Parent.Parent.Enabled = true
    local loadingRing = script.Parent.loadingRing
    local tweenInfo = TweenInfo.new(4, Enum.EasingStyle.Linear, Enum.EasingDirection.In, -1)
    local loadingRingTween = TweenService:Create(loadingRing, tweenInfo, {Rotation=360})
    loadingRingTween:Play()
end

if script.Parent.Parent.Enabled == true then
    StartLoad()
end
0
try doing "while wait() do" right before Line 13(without the quotes of course). Or getting the RunService by typing "local RunService = game:GetService("RunService") and then put RunService.RenderStepped:Connect(function() right before line 13 ShineBright2775 29 — 2d
0
Works using the while wait() do, although the tween isn't continuous. It plays then slows down reaching its destination. BoomerNEW_GEN 11 — 2d

Answer this question