Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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.

game:GetService("RunService").RenderStepped:connect(function()
	bounceRate = (bounceRate or 0) + math.rad(speed)
	bounce = bounce + math.sin(bounceRate)
	local camera = workspace.CurrentCamera.CoordinateFrame.lookVector
	local angle = CFrame.Angles(0,math.atan2(camera.X,camera.Z)+math.rad(180),0)
	game.Players.LocalPlayer.Character:SetPrimaryPartCFrame(CFrame.new(game.Players.LocalPlayer.Character.PrimaryPart       .CFrame.p)*angle)
	game.Players.LocalPlayer.Character.Humanoid.CameraOffset = offset*Vector3.new(1,(bounce/(100))+1,1)
	for _,part in pairs(parts) do
		if part:IsA("BasePart") then
			part.LocalTransparencyModifier = 0
		end
	end
end)

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

2 comments

0

It's not choppy at all?

0

Really? It is for me..

1 answer

You could be experiencing this due to the fact that your graphic quality is set too high, try to turn it down a bit, I like to use 2, every game runs smooth for me that way. You can find it if you press Esc and go to settings while in your game. The issue is anyways with you. Your other option is to update your video player, such as Java.

This discussion is preserved as it was. New answers, comments, and votes are closed.