Im trying to make it so when a gui is clicked, the cam locks, the char anchors, and a gui appears. the camera only locks and thats it. it works fone in test solo though but not online
local currentcam = workspace.CurrentCamera
local customizing = false
local char = game.Players.LocalPlayer.Character
script.Parent.MouseButton1Click:connect(function()
if customizing == false then
customizing = true
currentcam.CameraType = "Scriptable"
currentcam.CoordinateFrame = char.HumanoidRootPart.CFrame * CFrame.Angles(0, 3.1, 0) * CFrame.new(3, 2, 10)
char.Torso.Anchored = true
script.Parent.Parent.background.Visible = true
elseif customizing == true then
script.Parent.Parent.background.Visible = false
customizing = false
currentcam.CameraType = "Custom"
char.Torso.Anchored = false
end
end)
EDIT: It seems to stop after i turn it to scriptable camera, so what did i do wrong when setting the frame?

2 comments
Is the script a LocalScript?
yes