I've been working on this game and I got parts in Workspace to light other bricks on fire, but the script doesn't seem to work when it goes in a tool (a torch in this case). Any help available?
function lightOnFire(part) print("Going to light this part on fire:") print(part.Name) fire = Instance.new("Fire") fire.Parent = part end firePart = game.StarterPack.Torch.FirePart firePart.Touched:connect(lightOnFire)
(Sorry if the code isn't showing up right, I'm still figuring this site out :P)
Your script is using a part which is in StarterPack. When the player spawns, that tool will be cloned into the player's inventory, but the script will remain checking the part in StarterPack.
I'd recommend using a LocalScript inside the tool, and change "firePart" to:
local firePart = script.Parent.FirePart