Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make any players inside smoke slowly die away?

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.

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)

9 comments

0

I don't need to make the opacity smaller, I need the smoke to hurt people, but thanks.

0

So sorry! Just changed it!

0

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.

0

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 :)

0

Ok thanks so much!!!

0

It says ur roblox account privacy is protecting me from pming u

0

Oh ok, you can either add me or just click on my scriptinghelpers profile and get my message link from there.

0

Ok

0

I just sent u a friend request on roblox

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.