Gui not working after res pawn


local RunService = game:GetService("RunService")
    local dis = RunService.RenderStepped:Connect(function()
        if StarterGui:FindFirstChild("MouseHover") then
            StarterGui.MouseHover.Position = UDim2.new(0, ((MOUSE.X)+20), 0, ((MOUSE.Y)-30))
        end
    end)

How do I make it so when the player dies it’s still working? This happens because when you res pawn PlayerGui gets destroyed all of a sudden.

Turn off the screengui’s ResetOnSpawn property so that it won’t reset when they die.

1 Like

But then it just won’t work at all. Basically this Mouse Hover stops when the player resets and that’s a problem.

Are there any errors in the output?

Wait nvm u are right I am so dumb Sorry.