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
vSabov
(vSabov)
August 1, 2020, 7:12pm
#2
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
Vaschex
(Vaschex)
August 1, 2020, 7:20pm
#3
That would create many threads if you use a script for every ball.
You should use CollectionService for this.
vSabov
(vSabov)
August 1, 2020, 7:24pm
#4
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?