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 = Instance.new("ScreenGui", plrGui)

local txtButton = Instance.new("TextButton")

txtButton.BackgroundTransparency = 1

txtButton.Size = UDim2.new(0, 0, 0, 0)

txtButton.Modal = true

txtButton.Parent = screenGui

Put it in the StarterCharacterScripts and not the StarterPlayerScripts.

1 Like