Why dosent this script work in Online but works in Play mode in roblox studio cant really tell why this is happening so im asking you people. So i want it to be so if you click the gui button then you will be in free cam mode. This was the only thing i could think of to make it.
Script.
player = script.Parent.Parent.Parent.Parent
character = player.Character
torso= character.Torso
head = character.Head
-- these just help if you want to kill yourself or something
clicked = false
function OB1D(mouse)
end
script.Parent.MouseButton1Down:connect(function()
script.Parent.Parent.Parent.FreeCamGui:Destroy()
end)
script.Parent.MouseButton1Down:connect(function()
cam = game.Workspace.CurrentCamera
cam.CameraType = "Fixed"
cam.CameraSubject = nil
game.Players.LocalPlayer.Character = nil
mouse.Button1Down:connect(function () OB1D(mouse) end)
mouse.Button1Up:connect(Up)
end)

6 comments
It still dosent work in online
What is the output? (Press F9)
Torso is not a valid member of model.
Fixed.
Now the camera just stays in the same spot.
Okay, now all you need to do is change the position whenever a button is pushed. That's entirely different and I have successfully answered your question, so please accept my answer.