Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Changing Camera CoordinateFrame disables character movement?

Asked by 8 years ago

As soon as CoordinateFrame is changed, the player stops being able to move, but can still jump in place, any reason as to why, or can anyone suggest a fix?

Current Script:

local RS = game:getService('RunService')
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local Cam = workspace.CurrentCamera
repeat wait() until Player.Character
Player.Character:WaitForChild('Head')
Player.Character:WaitForChild('Torso')
local Character = Player.Character

wait(2)
Cam.CameraType = 'Scriptable'
wait(2)
local CamPart = Instance.new("Part",workspace)
CamPart.Anchored = true
CamPart.CanCollide = false
CamPart.Transparency = 1
CamPart.CFrame = CFrame.new(Character.Head.Position + Vector3.new(0,20,0),Character.Head.Position)
wait(2)

    Cam.CoordinateFrame = CamPart.CFrame
    wait(3)
    Cam.focus = CamPart.CFrame * CFrame.new(0,-1,0)
    wait(1)
    CamPart.CFrame = CFrame.new(Character.Head.Position + Vector3.new(0,20,0),Character.Head.Position)
0
What's the point in CamPart? Focus doesn't work with a Scriptable camera type. Cam.CoordinateFrame = CFrame.new(Start, LookAt) epicbreaker 95 — 8y
0
I realised that, but I've found that with a few camera types, it allows me to move. Really confused right now LunaScripter 80 — 8y
0
It's just a glitch where if the camera is directly above and focused directly on your character, your controls will be useless xolbStudios 127 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

I've run into this with CameraType set to scriptable, but I wanted the player to not be able to move, and changed his walkspeed, and anchored him. I'm now finding I didn't need to do all of that.

Try changing CameraType to "Custom" if you don't desire this effect.

Ad

Answer this question