I need help with this tool script

Hello,
I need help with this tool script.

So what it is about:
I am making a game called ‘Octus State’ and I wanted to make a tool that well when you click it, it is in your inventory e.g

Picture

I have checked devforum and I cannot find and help.

If, you could help me with my script that will help I can’t finish it I don’t know what to write.

Script
Lua

2 Likes

You mean, click a part to get tool?

1 Like

If you want to click code, it’s here.

game.Workspace.Baseplate.ClickDetector.MouseClick:Connect(function() -- idk why i do it on baseplate LOL

-- Code Goes Here --

end)

But if you mean that click a part to get the tool, just type it.

local tool = game.Lighting.YOURTOOLNAMEHERE:Clone() -- Your tool needs to be in the Lighting
local part = game.Workspace.YOURPARTNAMEHERE -- Dont forget to create a ClickDetector in your part

part:WaitForChild("ClickDetector").MouseClick:Connect(function(player)
	tool.Parent = player.Backpack
end)
1 Like