Hello everybody today when I did, Weapon kills instantly, but the problem is the client and the second player see another
script:
script.Parent.Hitbox.Touched:Connect(function(Hit)
local check = Hit.Parent.Name
local PlayerS = game.Players
local Player = PlayerS:FindFirstChild(check)
local PlayerHealth = Player.Character.Humanoid.Health
if script.Parent.MouseClick.Value == true then
if Player.Character.Humanoid then
if Player.Character.HumanoidRootPart then
Player.Character.Humanoid.Health = PlayerHealth-100
end
end
end
end)
The problem behind this is the usage of LocalScript. LocalScripts do not replicate to server and thus, the one client will only see the other client dead, while the other client is actually alive.
Try a conversion to a normal server script. LocalScript should communicate with the server using RemoteFunction or similar for optimal sync of input.
Ok so I remember someone talking about :TakeDamage() which actually will replicate to the server even if used in a local script, I might be wrong though. Let’s try it maybe it works.
if Player.Character.HumanoidRootPart then
Player.Character.Humanoid:TakeDamage(100)
end
That wouldn’t be possible, due to the fact if it was exploitable, exploiters would spam this as a kill all execution, damaging all players across the server.