Hello, I am Mark and recently I’ve been working on a Boss fight and I couldn’t get the spikes to tween themselves at the end of the ‘round of spikes’.
The solutions I’ve tried is checking its name before tweening and adding a “local a = x”, and neither of them worked
local stuff = workspace.Chapters.Chapter2.Spikes:GetChildren()
for i, x in ipairs(stuff) do
if x.Name == "Spike" then
local a = x
local TweenService = game:GetService("TweenService")
local tweenParts = a
local inform = TweenInfo.new(
1,
Enum.EasingStyle.Elastic,
Enum.EasingDirection.InOut,
0,
false,
0
)
local Goals = {
Position = Vector3.new(x.Position.X, 1,x.Position.Z),
Size = Vector3.new(1,1,1)
}
local PartTween = TweenService:Create(tweenPart, inform, Goals)
PartTween:Play()
x.Material = Enum.Material.SmoothPlastic
x["Damage Script"]:Destroy()
end
end