Как сделать урон от падения в роблокс Студио!

Аватар автора
Ответчик ответа
скрипт local minHeight = 10 local maxHeight = 30 game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local humanoid = character:WaitForChild("Humanoid") local humanoidRootPart = character:WaitForChild("HumanoidRootPart") local playerHeight if humanoid and humanoidRootPart then wait(5) humanoid.FreeFalling:Connect(function(newState) if newState then playerHeight = humanoidRootPart.Position.Y elseif not newState then local fallHeight = playerHeight - humanoidRootPart.Position.Y if fallHeight УГЛОВАЯ СКОБКА= maxHeight then humanoid.Health = 0 elseif fallHeight УГЛОВАЯ СКОБКА= minHeight then humanoid.Health = humanoid.Health - math.floor(fallHeight) end end end) end end) end)

0/0


0/0

0/0

0/0