Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

My Loading Screen GUI still resets when 'ResetOnSpawn' is disabled?

Asked by 5 years ago
Edited 5 years ago

Hello, I have been having this issue for a while now.

I have cleaned about every issue/bug in my game so far - but this one, I don't think will be easy to fix. I have already asked three people on the Discord about this particular problem - not one of them so far has found a reasonable explanation to why it isn't working.

https://imgur.com/a/bXhny9J

If you open the link above - you can clearly see it being un-checked/un-ticked. However when I play the game, then respawn - it still resets the GUI.

Another confusing thing I found out was that when the GUI was clearly visible. The properties tab told otherwise - and said my GUI was Disabled when it was clearly Enabled? Take a look.

https://imgur.com/a/sSzg7fc

So I am beginning to conclude that it might just be ROBLOX's fault? I have done everything right(in setting the values, and having no error given - even with pcall) so I doubt it'd have something to do with my scripting. If you do want to see my scripts then here you go.

-- LocalScript inside of 'PlayButton' - inside of Starter/Player(Gui)

local frame = game.Players.LocalPlayer.PlayerGui.GUIS.LoadingGUI:WaitForChild("Background")
local bars = frame.Bars
local play = frame.Play
local label = frame.Label

play.MouseButton1Click:Connect(function()
    frame:TweenPosition(UDim2.new(1.5, 0, 0, 0), 'Out', 'Elastic', 4)
    script.Parent.Parent.Parent.Parent.Information.Enabled = true
    wait(4)
    frame.Visible = false
    frame.Parent.Enabled = false
end)
Separation Line
-- LocalScript inside of 'LoadingGUI' - inside of Starter/Player(Gui)

script.Parent.Enabled = true

They're the main Scripts that I think are possibly causing the issue.

Let me know if you find out why this isn't working, thanks!

0
Could just be a bug. You can file a bug reportin the devforum giving them info on how to reproduce the bug. User#24403 69 — 5y
0
nice blog u got there TheluaBanana 946 — 5y
0
Try cloning the UI from replicated storage and parenting it directly to the PlayerGui Prestory 1395 — 5y

1 answer

Log in to vote
1
Answered by
Aqu_ia 39
5 years ago

Very simple answer. All you really need to do is move your Screen Gui to replicated storage and insert a script to workspace. Then, in the script, write this:

local plr= game.Players.LocalPlayer 
local gui = game.ReplicatedStorage.GUINAME

if not player.PlayerGui:FindFirstChild(gui) then
    gui:Clone().Parent = player.PlayerGui 
end
0
Okay I'll test it out when I get home, thanks. TheOnlySmarts 233 — 5y
0
I am back and just saying the script wouldn't work. You can't have a script in the 'Workspace' and then get the LocalPlayer or PlayerGui as that can only be done from the Server using RemoteEvents. TheOnlySmarts 233 — 5y
0
Thanks for helping though. TheOnlySmarts 233 — 5y
0
However I changed the script from Workspace destination to StarterPack destination and it worked! Thanks! TheOnlySmarts 233 — 5y
0
I meant to say StarterPack, my bad. Sorry if it was confusing! Aqu_ia 39 — 5y
Ad

Answer this question