I am making a clone script which isn't working and I think it is because it is a model, is there any way to clone a model? If this is not the case could you please tell me what is wrong with this script? Thanks!
My current script
local Enemies = script.Parent.Enemies
game:WaitForChild("Players").PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
Enemies.Dark:Clone().Parent = game.Workspace.Enemies
Enemies.Dark1:Clone().Parent = game.Workspace.Enemies
Enemies.Dark2:Clone().Parent = game.Workspace.Enemies
Enemies.Dark3:Clone().Parent = game.Workspace.Enemies
Enemies.Dark4:Clone().Parent = game.Workspace.Enemies
Enemies.Dark5:Clone().Parent = game.Workspace.Enemies
while true do
wait(1)
if char.Humanoid.Health == 0 then
Enemies.Dark:Clone().Parent = game.Workspace.Enemies
Enemies.Dark1:Clone().Parent = game.Workspace.Enemies
Enemies.Dark2:Clone().Parent = game.Workspace.Enemies
Enemies.Dark3:Clone().Parent = game.Workspace.Enemies
Enemies.Dark4:Clone().Parent = game.Workspace.Enemies
Enemies.Dark5:Clone().Parent = game.Workspace.Enemies
end
end
end)
end)

6 comments
Thanks, I had no idea that was what the brackets were for
If this is the correct answer please accept it. I just would like to keep track of what I fixed or has been fixed (it helps others too).
I just tested it and it didn't work
What happens when you run it? Any errors?
I get no errors
Are you running this on a normal script? Also, did you make sure the script is either in ServerScriptService, Workspace, StarterCharacterScripts, or StarterPlayerScripts?