So I’m currently making a custom movement system and I’m rewriting it because originally I was using BodyVelocity for the movement. That’s not the point though… Would there be a way to tween this?
body.CFrame = body.CFrame + body.CFrame.lookVector * 1
Here’s the entire script for the movement
–// Services and Top-Level Singletons
local Players = game:GetService(“Players”)
local tweenservice = game:GetService(“TweenService”)
local UIS = game:GetService(“UserInputService”)
local RunService = game:GetService(“RunService”)–// Objects
local player = Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local body = char:WaitForChild(“Body”)
–local bodyvelocity = body:WaitForChild(“BodyVelocity”) --NOOB WAIT FOR THIS TOO LMAO
local camera = workspace.CurrentCameralocal forward = tweenservice:Create(body, TweenInfo.new(.5), {Velocity = Vector3.new(15,0,0)})
–local stop = tweenservice:Create(bodyvelocity, TweenInfo.new(.5), {Velocity = Vector3.new(0,0,0)})
–// Initializeif not camera.CameraType == Enum.CameraType.Scriptable then
while true do
camera.Changed:Wait()
if camera.CameraType == Enum.CameraType.Scriptable then
break
end
end
end–// Input.
– TODO: Swap to ContextActionService, it’s way more flexible.UIS.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.KeyCode.W then
RunService.RenderStepped:Connect(function(Delta)
body.CFrame = body.CFrame + body.CFrame.lookVector * 1
end)
end
end
end)
I want the tween to be somewhat like this:
local forward = tweenservice:Create(body, TweenInfo.new(.5), {Velocity = Vector3.new(15,0,0)})
Any and all help is highly appreciated, Cheers!