I have a model that contains a bunch of other models that contain parts. The problem I have is that whenever the script cannot find the model in the workspace it clones a model from Replicated and places it in the workspace, when the following lines of code run that tween the size of the models within the model, the first few tweens in the loop dont visually play out instead the skip right to the end tween, granted the tween is very fast but i use replay to slow it down and its always when the script creates a new clone model that the tween skips over the few first loops that the issue appears, if the model already exists and the loop tweens the size the issue doesnt exist.
if PlayerWallCooldown[Player.Name] == true or PlayerLongCooldown[Player.Name] == true then return end
PlayerActive[Player.Name] = true
if game.Workspace["PinkHexaAffects"..Player.Name]:FindFirstChild("HexaShiftWall") == nil then
local HexaWall = Replicated.Assets.Meshes.PinkHexaMeshes.HexaShiftWall:Clone()
HexaWall.Parent = game.Workspace:FindFirstChild("PinkHexaAffects"..Player.Name)
HexaWall.PrimaryPart = HexaWall.HS0.Body
HexaWall.PrimaryPart.CFrame = RootPart.CFrame * CFrame.new(0,1.7,-10) * CFrame.Angles(math.rad(270),math.rad(0),math.rad(0))
HexaWall.Name = "HexaShiftWall"
PlayerBeginTime[Player.Name] = tick()
end
local HexaWall = game.Workspace["PinkHexaAffects"..Player.Name]:WaitForChild("HexaShiftWall")
coroutine.wrap(function()
for count = 0,6,1 do
for i,v in pairs(HexaWall:GetDescendants()) do
if v.Name == "HS"..count then
v.Body.Transparency = 0.68
v.Outline.Transparency = 0
HexaSetSize(v,Vector3.new(3.194, 0.435, 3.689),Vector3.new(3.269, 0.445, 3.775),0.07,Enum.EasingStyle.Quad,Enum.EasingDirection.Out)
end
end
task.wait(0.03)
end
end)()
end
The first time the hexagons appear is when the issue happens, second time it doesn’t you can tell because less of them seem to have spawned out of thin air fully sized