I have a script that is supposed to tween the red brick to the blue brick when touched. However, when I touch the brick, this happens. any help?
function onTouched()
local TweenService = game:GetService("TweenService")
local Part = script.Parent
local info = TweenInfo.new(
2,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
false,
0
)
local Goals =
{
CFrame = Part.CFrame * CFrame.new(-126.33, 0.025, 125.99)
}
local Tween = TweenService:Create(Part,info,Goals)
Tween:Play()
end
script.Parent.Touched:connect(onTouched)

1 comment
It looks like you're just giving it the wrong goal. Try setting the goal CFrame to the blue part's CFrame (because the blue part is the goal)