When I clone a object it is always invisible

This right here is a part of my script where I clone a tornado, but when I do its invisible, Why?


		local wing1 = game.ReplicatedStorage.Assets.Tornado:Clone()
		wing1.Parent = workspace
		wing1.CFrame = Character.HumanoidRootPart.CFrame - Character.HumanoidRootPart.CFrame.lookVector*1.5 + Character.HumanoidRootPart.CFrame.rightVector*5 + Vector3. new(0,1,0)
		game:GetService("TweenService"):Create(wing1.PointLight,TweenInfo.new(1.1),{Range = 0}):Play()
		game:GetService("TweenService"):Create(wing1,TweenInfo.new(1.1),{Transparency = 0,Orientation = wing1.Orientation + Vector3.new(0,-70,0),Position = wing1.Position - Character.HumanoidRootPart.CFrame.lookVector*5 - Character.HumanoidRootPart.CFrame.rightVector*2}):Play()
		game.Debris:AddItem(wing1, 1.3)
		
		pcall(function()
			Character.HumanoidRootPart.WingFlap:Play()
		end)
		
1 Like

The Debris service allows the developer to schedule the removal of the object without yielding any code, through the usage of the Debris:AddItem method.

The Debris.AddItem takes a time in secs as arg. In ur case debris destroyed the item in 1.3 secs. Try changing the value of the timer to smth lik 10.

1 Like

Try changing the transparency level, I believe that’s the issue after looking at the script.

1 Like
local storage = game:GetService("ReplicatedStorage")
local wing1 = storage:WaitForChild("Assets"):WaitForChild("Tornado"):Clone()
wing1.Parent = workspace
wing1.CFrame = Character.HumanoidRootPart.CFrame - Character.HumanoidRootPart.CFrame.lookVector*1.5 + Character.HumanoidRootPart.CFrame.rightVector*5 + Vector3. new(0,1,0)
wing1.Transparency = 0
game:GetService("TweenService"):Create(wing1.PointLight,TweenInfo.new(1.1),{Range = 0}):Play()
game:GetService("TweenService"):Create(wing1,TweenInfo.new(1.1),{Transparency = 0,Orientation = wing1.Orientation + Vector3.new(0,-70,0),Position = wing1.Position - Character.HumanoidRootPart.CFrame.lookVector*5 - Character.HumanoidRootPart.CFrame.rightVector*2}):Play()
game.Debris:AddItem(wing1, 1.3)

pcall(function()
	Character.HumanoidRootPart.WingFlap:Play()
end)

I’ve added a few waits to allow for all of the instances to load before the script is executed further, I’ve also set the transparency property of the wings to 0 as this should make them visible (if it was previously set to 1), make sure there are no other conflicting scripts causing the wings to be invisible if this isn’t the case.

1 Like