I’m currently trying to make the Platform Part go from the Start to the Destination via a tween. For some reason, it keeps giving me this error:
“11:59:42.507 TweenInfo.new first argument expects a number for time. - Server - MoverScript:13”
I don’t know why it gives me that error since my first argument is the value of MoveTime, which is a Number Value.
Here’s the explorer and the script itself, help would be appreciated.
local TweenService = game:GetService("TweenService")
local Destination = script.Parent.Destination
local x = script.Parent.Platform
local Time = script.MoveTime.Value
local WaitTime = script.WaitTime.Value
local TI = TweenInfo:new(
Time,
Enum.EasingStyle.Sine,
Enum.EasingDirection.In,
-1,
true,
WaitTime
)
local Goals = {
CFrame = Destination.CFrame
}
local Tween = TweenService:Create(x, TI, Goals)
Tween:Play()