I have code that breaks a weld from the player:
local ReplicatedStorage = game:GetService("ReplicatedStorage") local createPartEvent = ReplicatedStorage:WaitForChild("CreatePartEvent") local player = game.Players.LocalPlayer local mouse = player:GetMouse() mouse.Button3Down:Connect(function() if game.workspace.Values.have.Value == 1 then game.workspace.Values.have.Value = 0 createPartEvent:FireServer() player.Character.Weld:Destroy() end end)
I put button3down, it is wrong. How do you detect it??
local UIS = game:GetService("UserInputService") UIS.InputBegan:Connect(function(key) if key.UserInputType == Enum.UserInputType.MouseButton3 then --code here end end)