I am trying to weld two parts together with a tool in a building game but i can’t get the remote event to get the things from the client script
client :
script.Parent.Equipped:Connect(function(hit)
local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Button1Down:Connect(function()
local Target = mouse.Target
local Target0
local Target1
if Target.Anchored == false then
script.Parent.Part0.Adornee = Target
script.Parent.Part0.Adornee = Target
Target0 = Target
local Part00 = Target0
mouse.Move:Connect(function(hit)
local Target = mouse.Target
script.Parent.Hover.Adornee = Target
mouse.Button1Down:Connect(function(hit)
if Target.Anchored == false then
script.Parent.Part1.Adornee = Target
Target1 = Target
local Part11 = Target1
script.Parent.Part0.Adornee = nil
script.Parent.Part1.Adornee = nil
script.Parent.RemoteEvent:FireServer(Part00,Part11)
end
end)
end)
end
end)
end)
Server :
script.Parent.RemoteEvent.OnServerEvent:Connect(function(Part00,Part11)
local ex = Instance.new("WeldConstraint")
ex.Parent = workspace
ex.Part0 = Part00
ex.Part1 = Part11
end)
Location:
Error :
This is my first time trying to work with remote events this way so help is appreciated