Setting ResetOnSpawn to false does nothing

Title explains it all, but I have a GUI that is the start/screen that I don’t want to appear again. But it still does after dying.

Screenshots -




Local Script -

local SideBar = script.Parent.SideBar
local Camera = game.Workspace.CurrentCamera
local player = game.Players.LocalPlayer

local function hover(button)
	button.MouseEnter:Connect(function()
		button.TextColor3 = Color3.fromRGB(144, 144, 144)
	end)
	button.MouseLeave:Connect(function()
		button.TextColor3 = Color3.fromRGB(255, 255, 255)
	end)
end

local function loadWeapons(plr)
	game.ReplicatedStorage.RemoteEvents.Gun.GiveStarterPistol:FireServer()
end

hover(SideBar.Play)
hover(SideBar.Settings)

SideBar.Play.MouseButton1Click:Connect(function()
	SideBar.Visible = false
	loadWeapons(player)
	player.PlayerGui.Main.Backpack.Enabled = true
	script.Parent.About.Visible = false
	Camera.CameraType = "Custom"
end)

SideBar.Settings.MouseButton1Click:Connect(function()
	script.Parent.About.Visible = not script.Parent.About.Visible
end)

If the local script is the problem, how do I disable after it has run?

1 Like

Reset on spawn just means if you want to GUI to redo all of it’s contents, kind of like refreshing the page, while disabling means that it will stay put when the player dies.

It doesn’t! That’s the point of setting it to false, so the GUI STAYS THERE even when the player dies.

1 Like

I know and when I disable it, it shouldn’t reset it.

No this is what I mean, (could you reply instead of edit)
The loading screen appears, you press play, it disables. Then you die it wouldn’t reset (enable)

Unless I don’t get anything lol.

Also I do I stop a local script from running again?

Either way, the gui shows up again.

That is Roblox’s core Gui, you just press a key to bring it up and to disable it.

1 Like

I don’t understand that well lol! What are you referring to the local script or the first thing I mentioned?

This:
image
Is a roblox core Gui. You have to manually disable it.

Wasn’t talking about that, should have mentioned. I was talking about the play screen. The guns I am using use a shoulder camera and it locks your mouse.

The default view is also a shoulder view.

One method is to clone the gui into the player’s playergui on the server side with PlayerAdded. that way when they die, they dont get the gui again because they aren’t rejoining the server, only getting a new character.

2 Likes

Ok. I’ll try that. Thanks!