The problem:
I am trying to figure out how to make a MouseLock style 3rd Person camera, but I cannot make the character move with camera.
The code:
local p = game.Players.LocalPlayer p.CharacterAdded:wait() local char = p.Character char.Humanoid.CameraOffset = Vector3.new(1.5, 0.5, 0.5)
What would I need to change/add to make it work?
NOTE: This is in a LocalScript, inside StarterPack.
Thank you :)
Okay, I've rewritten it:
Try using this:
self = script.Parent c = workspace.CurrentCamera player = game.Players.LocalPlayer char = player.Character or player.CharacterAdded:wait() humanoid = char:WaitForChild("Humanoid") -- Apply some properties player.CameraMaxZoomDistance = 400 player.CameraMinZoomDistance = .5 humanoid.CameraOffset = Vector3.new(1.5,.5,.5) function lock(part) if part and part:IsA("BasePart") then part.LocalTransparencyModifier = part.Transparency part.Changed:connect(function (property) part.LocalTransparencyModifier = part.Transparency end) end end for _,v in pairs(char:GetChildren()) do lock(v) end char.ChildAdded:connect(lock) char.ChildAdded:connect(lock)
I hope it works!