SOLVED] Cursor won't show when Player dies/resets

So, I have created two single Scripts both optimizing different sections of function. The Scripts work perfectly fine like required however as soon as the player would to die or reset the Players cursor will disappear how would I fix?

Loading Gui Script:

-- LoadingGui Script
local UserInputService = game:GetService("UserInputService")
UserInputService.MouseIconEnabled = false

game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu, false)


for i = 0,1,0.1 do
	script.Parent.Transparency = i

script.Parent.Visible = false
script.Parent.LoadingText.Visible = false

game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, true)
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)

UserInputService.MouseIconEnabled = true```
1 Like

StarterCharacter > Local Script for Cursor Cient Script:

-- Press "V" to unlock/lock the players Mouse
-- VToUnlock/LockMouse Script
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()


	if key == "v" then
		if player.PlayerGui.FreeMouse.ModalOption.Modal == false then
			player.PlayerGui.FreeMouse.ModalOption.Modal = true
			player.PlayerGui.FreeMouse.ModalOption.Modal = false

-- Enable the Cursor Script
local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Icon = "rbxassetid://15096364738" -- Custom Cursor ID

simply move it into starterplayerscripts
because startercharacterscripts are stored inside the character, so if you reset they can bug out for things like this. starterplayerscripts dont get deleted when you die because they’re stored in the player

1 Like

I already tried that and it didn’t fix my problem.

It needs to detect if the player is dead then enable mouse

does the gui that gets created have “ResetOnRespawn” set to true? - idk if thats the exact property name but its something like that

1 Like

Because I am using a Script that disables the Player cursor but only for the first 10 seconds of the game.

This Script only works when the Loading Gui is active.

No, I have disabled the Loading Gui so it doesn’t reset in spawn

you can use

local player = game.Players.LocalPlayer

player.CharacterAdded:Connect(function() -- if character spawns or respawns it'll trigger
--disable mouse and enabled custom mouse or something idk
1 Like

Where you mention “disable mouse and enabled custom mouse or something idk” would I put this line of code into that line?

-- Enable the Cursor Script
local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Icon = "rbxassetid://15096364738" -- Custom Cursor ID

That being said, will I also add enable mouse?

I am still needing help, thank you.

So, i tested out your script, and it works just fine…
Is it your full script? Like, i tested it twice, and it works perfectly

I’ll send a kit to show you what I meen

1 Like

LoadingGui.rbxm (7.3 KB)

So, whats the problem is? How can i reproduce it?
Because when i reset or die, it still looks like there is no problem with it

It doesn’t work for me for some reason

So, when you die after you loaded in, mouse disappears?

Yeah that is my issue, but you said it works for you but for me it doesn’t.