This bug started appearing yesterday at around the same time of the site outage. We assumed the bug would be fixed when the outage was but the issue is still persisting.
Currently our game UI scripts are not properly working on the default Roblox Client but when played using the Microsoft Windows Store version of Roblox the game loads fine.
When checking the scripts they seem to be running without error but when they need to read a ObjectValue’s value on the default client is always nil even when in studio it’s assigned a value.
I’ve uploaded the UI code that is conflicting on different Roblox versions on a uncopylocked place so that you can test and download it. You will notice that on the Windows Store client the menu will load fine like this.
While on the default Roblox client the buttons are all red.
The script does this when the ObjectValue does not have a assigned value. There is only 1 script inside and I’ve stripped away majority of the code to only the part causing the problem. I hope this helps in fixing the issue.
I believe this bug is caused by the Default client being a bit faster than the Windows store client, as simply adding a wait(1) at the top fixes the problem.
However
Not using an ObjectValue and instead checking to see if there’s a Frame that shares it’s name with a Button works as well and I recommend doing that instead.
This is a bug that still needs to be fixed on Roblox’s end, however.
Here’s the code that works on the Default client:
local Root = script.Parent
local TweenService = game:GetService("TweenService")
local Player = game.Players.LocalPlayer
local Children = Root.Menu.Options:GetChildren()
for i=1, #Children do
if Children[i]:IsA("Frame") then
Children[i].Button.MouseEnter:connect(function()
TweenService:Create(Children[i].Effect, TweenInfo.new(.75, Enum.EasingStyle.Quad), {Size = UDim2.new(1, 0, 1, 0)}):Play()
TweenService:Create(Root.Menu.Selector, TweenInfo.new(.5, Enum.EasingStyle.Quad), {Position = UDim2.new(0, 0, 0, Children[i].AbsolutePosition.Y - Root.Menu.AbsolutePosition.Y)}):Play()
end)
Children[i].Button.MouseLeave:connect(function()
TweenService:Create(Children[i].Effect, TweenInfo.new(.5, Enum.EasingStyle.Quad), {Size = UDim2.new(0, 0, 1, 0)}):Play()
end)
if Root.Parent:FindFirstChild(Children[i].Name) then
Children[i].Button.MouseButton1Click:connect(function()
Root.Visible = false
Children[i].AssociatedGui.Value.Visible = true
Player.PlayerGui.ClientGui.Leaderboard.Visible = false
if Children[i].AssociatedGui.Value.Name == "FreeFlight" then
workspace.CurrentCamera.CameraType = "Track"
workspace.CurrentCamera.CameraSubject = workspace.Display
elseif Children[i].AssociatedGui.Value.Name == "ATC" then
Player.PlayerGui.ClientGui.Leaderboard.Visible = true
end
end)
else
Children[i].BackgroundColor3 = Color3.fromRGB(240, 118, 118)
end
end
end
I would assume this was a unintentional change as it broke quite a few games from what I could tell. Also even when finding the frames only by the button’s names in our new version didn’t work without the loop so it seems UIObjects all load after scripts do not just a ObjectValue problem.