I would like to print something when you click a part while you are holding a tool. Here is my script. Local script in tool
local player = game.Players.LocalPlayer local tool = script.Parent Set = game.ReplicatedFirst.Set local Target = game.Workspace.Block tool.Equipped:Connect(function(mouse) mouse.Button1Down:Connect(function() if mouse.Target and mouse.Target.Parent then end end) end) tool.Activated:Connect(function() Set:FireServer(Target, tool) end) player.MouseButton1Click:Connect(function() Set:FireServer(Target, tool) end)
From this one, I am getting an error. 13:07:58.182 - MouseButton1Click is not a valid member of Player
Script in tool
local player = game.Players.LocalPlayer local tool = script.Parent Set = game.ReplicatedFirst.Set local Target = game.Workspace.Block Set.OnServerEvent:Connect(function(player, Target, tool) if Target == "Block" and tool.Eqquiped == true then print ("stuff happens") end end)
Thanks in advance