So I'm trying to make a point-and-click type of weapon, and I use a RemoteEvent so it registers on the server, and in output, it returns " 19:07:25.915 - Humanoid is not a valid member of Player"
--Local Script local player = game.Players.LocalPlayer local character = player.Character script.Parent.Equipped:Connect(function(mouse) mouse.Button1Down:Connect(function() if mouse.Target.Parent:FindFirstChild("Humanoid") then script.Parent.Attack:FireServer(mouse.Target.Parent) end end) end) --Script local tool = script.Parent local event = tool.Attack event.OnServerEvent:Connect(function(target) target.Humanoid.Health = 0 end)
The parameters for OnServerEvent include the player instance first, then the arguments.
event.OnServerEvent:Connect(function(playerInstance, target) target.Humanoid.Health = 0 end)