well, you see, when you make a new instance, it's just a plain old brick or whatever you made the new instance of. which led me to the question, how could I make it so that the instance damages people/have its own script? like always, I wish to learn.
✓ ANSWER ACCEPTED
how to make a new instance damage player and/or have a script in it?
1 answer
✓ Accepted answer
Is this what you're looking for?
local brick = Instance.new("Part")
brick.Parent = workspace
brick.Touched:Connect(function(toucher)
local human = toucher.Parent:FindFirstChild("Humanoid")
local damage = 42
if human then
human:TakeDamage(damage)
end
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
thanks.