When you touch the Clone you die

Hello I’m trying to make it where if you touch any clone you die I tried this but did not work please help!

*local Ball = game.ReplicatedStorage.ball*
  • while true do*
  •   local clone = Ball:Clone()*
    
  •   clone.Parent = workspace*
    
  •   wait(4)*
    
  •   clone.CanCollide = false*
    
  •   wait(2)*
    
  •   *
    
  •   *
    
  •       clone.Touched:Connect(function(hit)*
    
  •   		 *
    
  •   		if hit.Parent:FindFirstChild("Humanoid") ~= nil then*
    
  •   			hit.Parent.Humanoid.Health = 0 *
    
  •   		end *
    
  •   		*
    
  •   	end)*
    
  •   	*
    
  •   end`*Preformatted text*`*
1 Like

The Ball gets cloned therefore its scripts are cloned so just put if you touch the ball you die in the ball at replicatedstorage, and clone it in a separate place

That would create many threads if you use a script for every ball.
You should use CollectionService for this.

I’ll google on CollectionService thank’s for telling me an easier way!

So your saying make an new script for the clone and one for the death script?