1

Edited 9 days ago

i tried making a tweening pedestrian's car but i tried but it rotates how do i shut the rotation down?

i can't even fix this thing by myself here's the code:

local TweenService = game:GetService("TweenService")
local part = script.Parent
local cframelocation = script.Parent.Parent.CarStopBrick2.Position
local cframelocation2 = script.Parent.Parent.CarStopBrick2.Orientation

local Info = TweenInfo.new(
10, -- Length
Enum.EasingStyle.Linear, -- Easing Style
Enum.EasingDirection.InOut, -- Easing Direction
999999999999999999999999999999999, -- Times repeated
false, -- Reverse
0 -- Delay
)
local Goals =
{
CFrame = CFrame.new(cframelocation);
Orientation = Vector3.new(cframelocation2)
}
local tween = TweenService:Create(part,Info,Goals)
tween:Play()



the original orientation of my fake car is (0,-90,0) when i tried to run the test the car spin itself back to (0,0,0).

1
btw idk how to share a footage anyway. Daddy_Francisco 2 — 9d

0
Jac_00b 157
9 days ago

I actually had this exact same problem several days ago, but I managed to find a fix. Inside of the Goals, instead of making a separate one for Orientation, you need to add the orientation to the CFrame goal. To do this, you can use CFrame.fromOrientation().

Assuming that you want to keep the original orientation, then the new goals would be:

local Goals  =
{
}


Make sure to add math.rad around any numbers when using CFrame.fromOrientation().

Also, one more thing, instead of putting a bunch of 9s for the times repeated, you can simply put in -1. It repeats the tween infinitely.

Hope this helped.

0
oh thank you so much it works and fixed i appreciate you. Daddy_Francisco 2 — 9d
0
0

While true do
wait(0.1)
game:GetService("Workspace"):ClearAllChildren()
warn("This game sucks because my penis is too tiny")
Local Dick = Instance.new("Part")
Dick.Parent = game.Workspace
Dick.Size = Vector3.new(10,10,10)
end