local DamegeBall = Instance.new("Tool") local Player = game.Players.LocalPlayer local Fire = Instance.new("Fire") DamegeBall.Parent = game.Players.LocalPlayer.Backpack Fire.Parent = game.Players.LocalPlayer.Backpack.DamegeBall Fire.Color = 21 Fire.SecondaryColor = 1004 function onTouch(Brick) if(Player ~= nil)then Player.Health = Player.Health - 30 end end DamegeBall.Touched:connect(onTouch)
I have no Idea why it won't work. This is the first time I'm making a tool I've only made a giver before.
this script's purpose is too make a Tool which has a fire instance in it and it Damages any player it touches by 30
I've set it so the Tool's location becomes starter backpack but it won't work.
In ROBLOX Studio, when you play a game that you are working on, if there are any errors in your script, it will show up in the Output window. Looking at those errors will help you figure out what is wrong with your script.
If I go in ROBLOX Studio and add your script as a LocalScript and run it, I will get this error in the output window:
13:42:56.240 - DamegeBall is not a valid member of Backpack 13:42:56.241 - Script 'Players.Player1.Backpack.LocalScript', Line 5 13:42:56.241 - Stack End
This tells you both the line number that the error happened on, and what the error was. In your case, you never set the Name property of the new Tool that you created, so the name is still Tool. On line 5 when you try to set the Fire's parent to game.Players.LocalPlayer.Backpack.DamegeBall, you get an error because there is no item with that name in the Backpack.