Hello,
I'm trying to make a TopDown Camera View for my game, but, now that I did the script and all, it's not letting me move(I can only jump).
Here's the code, it's inserted inside the Character
while true do local cam=workspace.Camera local plr=game.Players:GetPlayerFromCharacter(script.Parent) cam.CameraType="Scriptable" cam.CoordinateFrame=CFrame.new(plr.Character.Torso.CFrame.p+Vector3.new(0,35,0),plr.Character.Torso.Position) cam.Focus=plr.Character.Torso.CFrame wait() end
You can test here if you want http://www.roblox.com/games/263405786/TopDown
The reason why your script wasn't working was because, you defined the camera
's setting to Scriptable
.
while true do local cam=workspace.Camera local plr=game.Players:GetPlayerFromCharacter(script.Parent) cam.CoordinateFrame=CFrame.new(plr.Character.Torso.CFrame.p+Vector3.new(0,35,0),plr.Character.Torso.Position) wait() end -- I removed the `focus` because, the focus isn't necessary.
If you're suffering from frames not rendering as fast, use RenderStepped
.
RenderStepped
and what does it do?RenderStepped is an event of RunService
, this event fires Every frame in approximately 1/60
of a second.
game:GetService("RunService").RenderStepped:connect(function() local cam=workspace.Camera local plr=game.Players:GetPlayerFromCharacter(script.Parent) cam.CoordinateFrame=CFrame.new(plr.Character.Torso.CFrame.p+Vector3.new(0,35,0),plr.Cha racter.Torso.Position) end)