Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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!

3 comments

0

Could just be a bug. You can file a bug reportin the devforum giving them info on how to reproduce the bug.

0

nice blog u got there

0

Try cloning the UI from replicated storage and parenting it directly to the PlayerGui

1 answer

✓ Accepted answer

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

5 comments

0

Okay I'll test it out when I get home, thanks.

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.

0

Thanks for helping though.

0

However I changed the script from Workspace destination to StarterPack destination and it worked! Thanks!

0

I meant to say StarterPack, my bad. Sorry if it was confusing!

This discussion is preserved as it was. New answers, comments, and votes are closed.