So, I'm making a poisonous smoke grenade. I've got the smoke coming out when you throw the grenade, now, I need the smoke to hurt people. Would TouchInterest be the answer? Please help me if you can.
✓ ANSWER ACCEPTED
How do I make any players inside smoke slowly die away?
2 answers
✓ Accepted answer
And as said as above,
local smoke = workspace.door
local bool = true
local dmgblock = Instance.new("Part",smoke)
dmgblock.CFrame = CFrame.new(smoke.Position)
dmgblock.Size = Vector3.new(5,5,5)
dmgblock.Anchored = true
dmgblock.CanCollide = false
dmgblock.Transparency = 1
dmgblock.Touched:connect(function(touch)
if bool then
local human = touch.Parent:FindFirstChild("Humanoid")
if human then
bool = false
human:TakeDamage(10)
wait(1)
bool = true
end
end
end)
You can make a invisible box that you can collide with and use the .Touched event, otherwise there is no other way.
This discussion is preserved as it was. New answers, comments, and votes are closed.

9 comments
I don't need to make the opacity smaller, I need the smoke to hurt people, but thanks.
So sorry! Just changed it!
Sorry, but I'm new to scripting. I just started about a week ago. Can you explain these lines of code to me so I can maybe use it for later? You don't have to, but if you do, that would be great.
I'd actually love to! Click on my profile and send me a private message and I'll message you back and explain this to you! Thanks :)
Ok thanks so much!!!
It says ur roblox account privacy is protecting me from pming u
Oh ok, you can either add me or just click on my scriptinghelpers profile and get my message link from there.
Ok
I just sent u a friend request on roblox