- We can make bp's maxForce infinity
- We can use RunService RenderStepped
Infinity
We can make the maxForce infinity using math.huge.
local infinity = math.huge
RenderStepped
In order to get RenderStepped we need to get to the RunService.
game:GetService("RunService")
Now we need to get RenderStepped, which is an event.
game:GetService("RunService").RenderStepped
Now we just add a connection and a function and an end.
game:GetService("RunService").RenderStepped:connect(function()
print("Foo")
end)
RunService is 2x faster than wait().
here is your script if you followed everything I told you to do.
local cam = game.Workspace.CurrentCamera
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
local focus = Instance.new("Part", game.Workspace)
focus.Anchored = true
focus.CanCollide = false
focus.Transparency = 1
local bp = Instance.new("BodyPosition", focus)
bp.D = 1250
bp.P = 10000
bp.position = focus.Position
bp.maxForce = Vector3.new(math.huge,math.huge,math.huge)
game:GetService("RunService").RenderStepped:connect(function()
focus.Position = plr.Character.Torso.Position
bp.position = focus.Position
cam.CameraSubject = focus
cam.CameraType = Enum.CameraType.Attach
cam.CoordinateFrame = CFrame.new(0,10, 10)
end)
Also, instead of making the camera's target the focus, we can use interpolate instead. Interpolate can make your camera slide smoothly. This way, we don't rely on parts and stuff.
Example of Interpolate:
workspace.Camera:Interpolate(50,10,15, game:GetService("Players").LocalPlayer.Character.HumanoidRootPart, 5)
Hope this helps!
1 comment
Thanks, I already finished that | And thanks for your time on typing all that explaination :O that's the only reason I accepted your answer...