There is no error.

local script Fires Server when certain key pressed.

and this is server script that receives fireserver()

ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function (player)
	local Hitbox = ReplicatedStorage.Hitbox:Clone()

	Hitbox.Touched:Connect(function (touched)
		if touched.Parent:FindFirstChild("Humanoid") then
		touched.Parent.Humanoid.Health = 0
		end
	end)

	Hitbox.Position = player.Character.PrimaryPart.Position
	Hitbox.Parent = workspace
	wait(0.2)
	Hitbox = nil
	Hitbox:Destroy()
end)

I skipped useless things about this problem like cooldown. It all works fine in studio but in-game, if ping is near or higher than 180 it doesnt fire Touched event. I guess it because 0.18sec is simillar to 0.2sec and Hitbox removes before it starts detects.

But but its server script NetworkOwnerShip is set to nil,which is server How do I even fix this problem?

2 comments

0

So can you explain what the point of this is? Like what is it doing? I just don't understand why you have someone press a key to fire a remote event to then have the server start listening for a touched event.

0

Also, just so you know, server checks are always dependant on ping, that's why no one likes playing with high ping on any game.