And i also have a 1s loop checking if the root y position is below the red partβs y position.
When the tower falls over to the side, the player will then get airborne and try to land on the concrete platform. But 50% of the time, even if they succeed, they get killed by the .Touched even firing on the server, or by the loop detecting that the player is too low.
Here is the code
while Character.Parent do
if Character.HumanoidRootPart.Position.Y < workspace.DeathPoint.Position.Y-2 then
print("player fell below death area")
Humanoid.Health = 0
end
task.wait(1)
end
workspace.DeathPoint.Touched:Connect(function(Hit)
if Hit.Parent:FindFirstChild("Humanoid") and Hit.Parent.Parent ~= workspace.Destroyers then
print("Player hit death area")
Hit.Parent.Humanoid.Health = 0
end
end)
Im guessing the issue is that the server thinks the player is further down than they actually are? But that doesnt make much sense, as the client is the networkowner, and therefore the physics owner.
Anyone got any solution? I considered making the client detect the player dying when hitting the death point, and having the server do a check if they reach the ground down below. But that feels like it just reduces the problem rather than solving it, if the lag gets too bad they could still die.
That would at most reduce the problem, but thing is, im thinking its likely affected by ping. With 250ms ping, you dont even get remotely close to the red part until you die. Lowering it would still have this issue be present, unless i move it super far down. But there has to be a better solution than that.
You could edit the script so it kills you lower but the red part is still in the same place
kinda like this:
while Character.Parent do
if Character.HumanoidRootPart.Position.Y < workspace.DeathPoint.Position.Y-10 then
print("player fell below death area")
Humanoid.Health = 0
end
task.wait(1)
end
Read the other reply i made above. I dont care about where the red part is, that will be invisible for the players, just that they die once they fall below the concrete platform that holds the tower
I tried it, and it did work, at least for 250ms ping. But i got another idea, ill simply kill the players on the clientside. If an exploiter knows how to do prevent that, they certainly know how to fly and such, which i wont even try to prevent considering the type of game im making and how unreliable the server player position is in this type of game.