player = game.Players.LocalPlayer char = player.Character cam = game.Workspace.CurrentCamera local part = Instance.new("Part") part.Transparency = 1 part.Parent = game.Workspace part.Anchored = true part.Position = Vector3.new(30,20,30) cam.CameraSubject = part wait(1) -- so that i have time to fall from the sky onto the baseplate while wait() do local h = char.Torso.Position part.Position = Vector3.new(h.X,20,h.Z) end
the script above makes a part above my head, end puts the camera in it. the only problem is that if i set my walkspeed high enough, the camera will be really jumpy trying to be at the position. i tried using.Changed, but for some reason, it never works for me. how do i have the parts position not be jumpy at high speeds?
You'll need the part to change position each time that the screen updates. You can use RunService's BindToRenderStep function to do this.
player = game.Players.LocalPlayer char = player.Character cam = game.Workspace.CurrentCamera local part = Instance.new("Part") part.Transparency = 1 part.Parent = game.Workspace part.Anchored = true part.Position = Vector3.new(30,20,30) cam.CameraSubject = part wait(1) -- so that i have time to fall from the sky onto the baseplate -- "move part" : The name of the bind, can be used with UnbindFromRenderStep to stop the function -- 2000 : The priority, higher values run after smaller values. 2000 should make it run last game:GetService("RunService"):BindToRenderStep("move part", 2000, function() local h = char.Torso.Position part.Position = Vector3.new(h.X,20,h.Z) end)