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)

2 comments
Please make your question title relevant to your question content. It should be a one-sentence summary in question form.
Looks to me you're trying to make a event out of a property. All you have to do is remove lines, 20,23, and 25. And removed "mouse" from the parenthesis on lines 21, and 22.