I have a specific tool that is removed from a players inventory when it goes in a certain area how do I make it so it lights on fire this is my script
local door = script.Parent local function remove(otherPart) local humanoid = otherPart.Parent:FindFirstChild('Humanoid') local player = game.Players:FindFirstChild(otherPart.Parent.Name) if humanoid and player then local inHand = otherPart.Parent:FindFirstChildWhichIsA('Tool') local inBackpack = player.Backpack:FindFirstChildWhichIsA('Tool') if inHand then if inHand.Name == "Tool" then inHand:Destroy() end end end end door.Touched:Connect(remove)
Add a local script in replicated script service. if you dont know how to get it. then go to the model tab, then the icon that is to gears
--Script by sabrna563 Local Tool = Game.players.localplayer.backpack:WaitForChild("ToolNameHere") --the Tool Repeat Wait (0.1) --If you delete this, the server might crash local ToolPos = Tool.Handle.position --Gets Vecter3 Position Until Tool = Nil --Waits until the tool is gone Base = Instance.new("Part") --Creates a place for the fire Base.position = ToolPos --Sets the position to where the tool was lasted used Local Fire = instance.new("Fire") --The Fire Fire.Parent = Base --Goes to where the base is Base.Transperency = 0.5 --You can edit it to just 1 but its 1 so you know where the base it