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 create fire on touch?

How can I create fire on a part after someone steps on it?

2 answers

✓ Accepted answer

You can create a script inside of the part that will do this. It's pretty simple! First you want to make sure the part is actually touched by a humanoid, then you create a fire on the part. Here is the code:

local PlayersService = game:GetService("Players")

local debounce = false

script.Parent.Touched:Connect(function (hit)
	if hit and hit.Parent:FindFirstChild("Humanoid") and PlayersService:GetPlayerFromCharacter(hit.Parent) and debounce == false then
		local fire = Instance.new("Fire")
		fire.Parent = script.Parent
		debounce = true
		wait(1)
		debounce = false
	end
end)

1 comment

1

that's what I was looking for. Thanks!

hey you! have you ever heard of enes? if you are in trouble, better call enes!

This discussion is preserved as it was. New answers, comments, and votes are closed.