I've tried many methods,
local plr = game.Players.LocalPlayer local cam = game.Workspace.CurrentCamera local chr = nil chr = character plr.CameraMode = 1 while false do wait () cam.CameraType = 0 cam.CoordinateFrame = CFrame.new (200,10,0) cam.Focus = CFrame.new (200,7,500) cam.FieldOfView = 20 end
and even
Game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
But the first method makes it glitchy while the second method doesn't work online. Why?
Well if your trying to find a Working one for Studio and Online here you go!
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) if plr and char then plr.CameraMaxZoomDistance = 0.5 plr.CameraMinZoomDistance = 0.5 end end) end)
Make sure you use a Script
Not sure why it wouldn't work. BUT you can do a
while wait() do -- Which keeps looping really fast game.Players.LocalPlayer.CameraType = "LockFirstPerson" --That may not be how it's spelt, But that should work. end
What if you put it in a RenderStepped loop?
game:GetService("RunService").RenderStepped:connect(function() -- Faster then wait() game.Players.LocalPlayer.CameraType = "LockFirstPerson" -- Lock Camera end)
http://wiki.roblox.com/index.php?title=API:Class/RunService/RenderStepped