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

Can someone help me about my tween service issues, please?

Asked by 1 year ago
Edited 1 year 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 — 1y

2 answers

Log in to vote
0
Answered by
Jac_00b 157
1 year 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  =
{
CFrame = CFrame.new(cframelocation)*CFrame.fromOrientation(0,math.rad(-90),0)
}

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 — 1y
0
That's a fake answer lol TheLavaPigsYOUTUBE 10 — 1y
Ad
Log in to vote
0
Answered by 1 year ago

Here is the true answer dickwad hahahaha

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

Answer this question