Detect when player clicks with remote event being fired

  1. Basically, a player will click on a text button and it will fire a remote. I want to wait until they click and if it is a player then it will weld.

  2. Can’t find out how ot wait for the click.
    Local Script

	print("yes")
	script.Parent.RemoteEvent:FireServer()
end)

Server Script

	local Mouse = player:GetMouse()
print("yes")
	Mouse.Button1Down:Connect(function()


		local mouse = player:GetMouse()
		local t = mouse.Hit
		print(t)
		if t == "HumanoidRootPart" then
			local instance = Instance.new("WeldConstraint")
		end
	end)
end
)
		
	

If you’re just waiting for them to click once, you can use the :Wait() instead of :Connect()