hello, i’m having trouble tweening a part. i’ve tried multiple solutions, but have always gotten the “Unable to cast directionary” error. please help
here’s my script
local ts = game:GetService("TweenService")
local info = TweenInfo.new(
3,
Enum.EasingStyle.Sine,
Enum.EasingDirection.InOut,
0,
false
)
local candmgmain = false
script.activated.OnServerEvent:Connect(function()
local part = game.ReplicatedStorage.bossabilities.meteor:Clone()
part.Parent = workspace
part.Transparency = 0
part.Position = Vector3.new(-46.39, 150, -83.17)
local goal = {Position = -46.39, 12.732, -83.17}
local tween = ts:Create(part, info, goal)
candmgmain = true
tween:Play()
task.wait(3.1)
task.wait(7)
part.Touched:Connect(function(hit)
if candmgmain == true and hit.Parent:FindFirstChild("Humanoid") then
local hum = hit.Parent.Humanoid
local damage = math.random(50,80)
local candmg = true
if candmg == true then
hum:TakeDamage(damage)
candmg = false
end
end
end)
candmgmain = false
repeat
part.Transparency += 0.05
task.wait(0.1)
until part.Transparency == 1
part:Destroy()
end)