I need a fix for this script so the script can run when the players join and it makes the camera freeze. This is the script of the tool to freeze:
function onButton1Down(mouse) L = Instance.new("Part") L.Parent = game.Workspace L.Name = game.Players.LocalPlayer.Name.. "'s Camera" L.Position = game.Workspace.CurrentCamera.Focus.p L.Anchored = true L.CanCollide = false L.Transparency = 1 game.Workspace.CurrentCamera.CameraSubject = L game.Workspace.CurrentCamera.CameraType = 4 end function onButton1Up(mouse) L:remove() game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Head game.Workspace.CurrentCamera.CameraType = 4 end function onSelected(mouse) mouse.Button1Down:connect(function() onButton1Down(mouse) end) mouse.Button1Up:connect(function() onButton1Up(mouse) end) end script.Parent.Selected:connect(onSelected)
function onButton1Down(mouse) L = Instance.new("Part") L.Parent = game.Workspace L.Name = game.Players.LocalPlayer.Name.. "'s Camera" L.Position = game.Workspace.CurrentCamera.Focus.p L.Anchored = true L.CanCollide = false L.Transparency = 1 game.Workspace.CurrentCamera.CameraSubject = L game.Workspace.CurrentCamera.CameraType = 4 end function onButton1Up(mouse) L:remove() game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Head game.Workspace.CurrentCamera.CameraType = 4 end mouse.Button1Down:connect(function() onButton1Down() end) mouse.Button1Up:connect(function() onButton1Up() end)
That should work?