So I'm making a KO script so that after running out of health your character falls over. I'm looking to use an effect of falling over that is similar to setting PlatformStanding to enabled. My current issue is that, if the players hit backspace then they obviously get up from it. Which I don't want.
-- This will be put into the Players Character Model.
local Character = script.Parent
local Humanoid = nil -- Setting this up so if we decide to rename the humanoid we still find it.
for Num, On in pairs(Character:GetChildren()) do
if On:IsA("Humanoid") then
Humanoid = On
end
end
local KO_Value = Instance.new("IntValue", Character)
KO_Value.Name = "Player_KO"
game.Debris:AddItem(KO_Value, 300)--Just incase
Humanoid.PlatformStand = true
for OnTime = 1, math.ceil(script.KO_Time.Value) do
wait(1) -- Wait out the time
end
Humanoid.PlatformStand = false
game.Debris:AddItem(KO_Value, 0.01)
script:remove()
The script is placed into the Character's model, and there's a Number Value inside of it named "KO_Time" (Literally the time in seconds you're going to be KO'd).
Thanks for your time.
