Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

any clue on how to fix this aiming on a part with bodyvelocity?

Asked by
Elixcore 1337 Moderation Voter
6 years ago
Edited 6 years ago
local shock = scr.shock:Clone()
            shock.Parent = workspace
            shock.CFrame = plr.Character:WaitForChild("RightHand").CFrame * CFrame.new(0,90,0)
            shock.Orientation = plr.Character:WaitForChild("RightHand").Orientation - Vector3.new(0,0,180)
            shock.BodyVelocity.Velocity = plr.Character.LowerTorso.CFrame.lookVector * 400
            game.Debris:AddItem(shock, 2)

this is the code

and this is a gif of the broken aiming.

https://gyazo.com/3867642b0b6de83932bad6a4f3929334

does anyone know how to fix the aiming?

0
instead of using body velocity, try lerping or CFrame the 'shock' hellmatic 1523 — 6y
0
http://wiki.roblox.com/index.php/Lerp you can use lerp for tweening parts hellmatic 1523 — 6y
0
Sickings, thank you for telling me about lerp but im very confused on how to use it, could you please help? shock.Position:lerp(vector.Value, 1) Elixcore 1337 — 6y
0
that's incorrect along with (vector.Value) and (vector.Value, 0) Elixcore 1337 — 6y

Answer this question