Mouse Move Script Glitch

I have a script that will allow the player to move there mouse in first person mode. When ever they die, it stops working

local plrGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")

local screenGui ="ScreenGui", plrGui)

local txtButton ="TextButton")

txtButton.BackgroundTransparency = 1

txtButton.Size =, 0, 0, 0)

txtButton.Modal = true

txtButton.Parent = screenGui

Put it in the StarterCharacterScripts and not the StarterPlayerScripts.

1 Like