The error is already the title, what I am trying to do is like an elevator the script currently was working on a for loop cframe, but it recently went buggy for unknown reason so I wanted to use tweenservice instead can anyone tell me what does it mean?
Note: I tried using vector3 instead but nothing worked and there wasn’t even any error
local tween = TweenInfo.new(
4,
Enum.EasingStyle.Linear,
Enum.EasingDirection.In,
0,
true,
0
)
local goes = {
Position = CFrame.new(574.675,116.99,331.876);
}
script.Parent.Parent.Active.Changed:Connect(function()
if script.Parent.Parent.Active.Value == true then
game.TweenService:Create(script.Parent, tween, goes)
--[[for i = 1, script.Parent.Size.x * script.Parent.Parent.Sep.Value do
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(-51.05 / script.Parent.Parent.Sep.Value, 0, 0)
wait(script.Parent.Parent.MiniWait.Value)
end
wait(script.Parent.Parent.OpenTime.Value)
for i = 1, script.Parent.Size.x * script.Parent.Parent.Sep.Value do
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(51.05 / script.Parent.Parent.Sep.Value, 0, 0)
wait(script.Parent.Parent.MiniWait.Value)
end]]
end
script.Parent.Parent.Active.Value = false
end)
--local Down = {
--Position = CFrame.new(574.675 , 4.5 , 331.876)
--}