Why is the movement choppy?
Alright, so I've been working on a 3rd person script, and it works, kinda. There are no errors, but the movement is very choppy. What I mean, is that when the player moves the mouse, the player's body does move in the right direction, however it looks rather odd for some reason. Yes, I am using RenderStepped.
01 | game:GetService( "RunService" ).RenderStepped:connect( function () |
02 | bounceRate = (bounceRate or 0 ) + math.rad(speed) |
03 | bounce = bounce + math.sin(bounceRate) |
04 | local camera = workspace.CurrentCamera.CoordinateFrame.lookVector |
05 | local angle = CFrame.Angles( 0 ,math.atan 2 (camera.X,camera.Z)+math.rad( 180 ), 0 ) |
06 | game.Players.LocalPlayer.Character:SetPrimaryPartCFrame(CFrame.new(game.Players.LocalPlayer.Character.PrimaryPart .CFrame.p)*angle) |
07 | game.Players.LocalPlayer.Character.Humanoid.CameraOffset = offset*Vector 3. new( 1 ,(bounce/( 100 ))+ 1 , 1 ) |
08 | for _,part in pairs (parts) do |
09 | if part:IsA( "BasePart" ) then |
10 | part.LocalTransparencyModifier = 0 |
There's the main code. If you want to see what I mean, here's the place:
http://www.roblox.com/games/301680604/Waffloids-Place-Number-12808