For the past 24 hours I’ve been dealing with what appears to be an isolated bug. I noticed yesterday at roughly 8:00 AM that I had to click the frame that I was applying a tween on for the actual tween animation to work. I’m hoping this is something related to my code and not a Studio bug. Below are some videos and snippets of my code.
Studio Result
Roblox Player Result
Code (Client)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")
local StarterGui = game:GetService("StarterGui")
local Players = game:GetService("Players")
local Shared = ReplicatedStorage:WaitForChild("Shared")
local Remotes = Shared:WaitForChild("Remotes")
local Libraries = Shared:WaitForChild("Libraries")
local Style = require(Players.LocalPlayer.PlayerScripts.Dependencies:WaitForChild("Style").ClassUI)
local Background = script.Parent.Background
local ClassSelection = Background:WaitForChild("ClassSelection")
local ClassInformation = Background:WaitForChild("ClassInformation")
local Tweens = {
Show_Background_Frame_Tween = TweenService:Create(Background, TweenInfo.new(Style.Time, Style.EasingStyle, Style.EasingDirection, 0, false, 0), {BackgroundTransparency = 0.55}),
Show_Class_Selection_Tween = TweenService:Create(ClassSelection, TweenInfo.new(0.2, Style.EasingStyle, Style.EasingDirection, 0, false, 0), {Position = UDim2.new(0.05, 0, 0.15, 0)}),
Show_Class_Information_Tween = TweenService:Create(ClassInformation, TweenInfo.new(Style.Time, Style.EasingStyle, Style.EasingDirection, 0, false, 0), {Position = UDim2.new(0.5, 0,0.1, 0)}),
Hide_Class_Selection_Tween = TweenService:Create(ClassSelection, TweenInfo.new(0.2, Style.EasingStyle, Style.EasingDirection, 0, false, 0), {Position = UDim2.new(-0.5, 0, 0.15, 0)}),
Hide_Background_Frame_Tween = TweenService:Create(Background, TweenInfo.new(0.1, Style.EasingStyle, Style.EasingDirection, 0, false, 0), {BackgroundTransparency = 1}),
Hide_Class_Information_Tween = TweenService:Create(ClassInformation, TweenInfo.new(Style.Time, Style.EasingStyle, Style.EasingDirection, 0, false, 0), {Position = UDim2.new(1, 0,0.1, 0)})
}
for _, Button in pairs(script.Parent.Background.ClassSelection:GetChildren()) do
if Button:IsA("ImageButton") then
Button.MouseButton1Down:Connect(function()
Tweens.Show_Class_Information_Tween:Play()
local ClassQuery = Remotes.GetClassDescription:InvokeServer(Button.Name)
if ClassQuery ~= nil then
ClassInformation.NameClass.Text = Button.Name
ClassInformation.ClassDescription.Text = ClassQuery.Description
end
end)
end
end
Remotes.ClassGuiSwitch.OnClientEvent:Connect(function(Request)
if Request == "Show" then
Tweens.Show_Background_Frame_Tween:Play()
Tweens.Show_Background_Frame_Tween.Completed:Connect(function()
Tweens.Show_Class_Selection_Tween:Play()
end)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
elseif Request == "Hide" then
Tweens.Hide_Class_Selection_Tween:Play()
Tweens.Hide_Class_Information_Tween:Play()
Tweens.Hide_Background_Frame_Tween:Play()
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
end
end)```
Any help or suggestions is appreciated; thanks!