I need to make a script where if a tool touches a part, it makes a hole in the part. The part I am having trouble with is referring to the tool, since it is in starter pack. Usually, I would go ‘workspace.part’, but ‘StarterPack.tool.part’ does not work. I tried game:GetService(“StarterPack”), but I cannot refer to a specific tool inside of starter pack, or a part in the tool. Thanks
You could use an object value to store a reference to the tool in replicated storage
game.StarterPack should work
You should also put any scripts that deal with the tool inside the tool
If you wanted to do a touch function, you are able to use:
if hit.Name == "ToolName" then
do whatever
end
For one, when you try to access the tool through the starterpack, you are modifying the template of the tool, and not the one the player currently has.
Inside the players character, the physical tool (through a localscript)
game.Players.LocalPlayer.Character.ToolName
Inside the player’s backpack:
game.Players.LocalPlayer.Backpack.ToolName
Is the script inside the tool? If it is then just say: Local Tool = script.Parent
If you’re in a server script then do this: Player = (player directory)
Local Tool = Player.Backpack:FindFirstChild(“Tool”)
Thanks for all the help! I was able to reference the tool in the script, but the rest of it didn’t work anyways. I’ll probably try again a different way.