I know this is probably a simple question, but I can't seem to figure it out. Essentially, I want your character to "catch fire" when you step on a fire. I know how to do the damage over time and all that stuff, but what I'm wondering is how to create a fire on the character's torso. Any help with this would be very much appreciated.
Put this script in the block you want to catch players on fire:
script.Parent.Touched:connect(function(hit) if hit.Parent:firstFindChild("Humaniod") ~= nil and hit.Parent:firstFindChild("Torso") ~= nil then fire = Instance.new("Fire", hit.Parent.findFirstChild("Torso")) end end)
This might not work because I didn't test it
fire = game.Workspace.Part.Fire part = game.Workspace.Part plr = game.Workspace.LocalPlayer function onTouched(hit) if plr:onTouched(Part) then game.Workspace.plr:GetPlayers("Torso") plr.Torso.Fire.Enabled = false end end script.Parent.Touched:connect(onTouched)