I'm working on a game that has a system where you swap between 2d and 3d status, when going back into 2d, the body position properties wont change and you arent locked back into 2d properly.
the script is a LocalScript and in StarterCharacterScripts
task.wait(0.1)
script.Perspective.Value = not script.Perspective.Value
local cam = workspace.Camera
local char = script.Parent
local hrp = char.HumanoidRootPart
task.wait()
local Positioner = hrp.BodyPosition
Positioner.MaxForce = Vector3.new(0, 0, 1e10)
Positioner.Position = Vector3.new(0, 0, 2)
print(Positioner.MaxForce)
print(Positioner.Position)
game:GetService("RunService").RenderStepped:Connect(function()
if script.Perspective.Value == true then
cam.CameraType = Enum.CameraType.Scriptable
cam.CFrame = cam.CFrame:Lerp(CFrame.new(hrp.Position + Vector3.new(0, 5, 35), hrp.Position), 0.1)
else
return
end
end)
end```
** You are now Level 1! **