Checking for 2 values using or doesn’t work at all.
So I want this OnDeath script to detect if the player died or not (If I don’t do a check that changes the player’s respawn time, the timestop will be bugged and stay there forever) but the script keeps failing to recognize the value; Timestopping. And by I mean failing, it NEVER detects it. But for some reason it Detects ‘Timestopper’ Here’s the script.
if not chr:FindFirstChild("Timestopper") or not chr:FindFirstChild("Timestopping") then
if chr:FindFirstChild("RagdollTrigger") then
chr.RagdollTrigger.Value = true
end
if chr:FindFirstChild("Stand") then
for i,v in pairs(chr.Stand:GetChildren()) do
v.Transparency = 1
end
end
deathsound(deathsfx,5,torso)
wait(5)
plr:LoadCharacter()
elseif chr:FindFirstChild("Timestopper") or chr:FindFirstChild("Timestopping") then
-- I REALIZE THAT THE SCRIPT DOES DETECT 'Timestopper' but never 'Timestopping'
chr.Iframes.Value = true
if chr:FindFirstChild("RagdollTrigger") then
chr.RagdollTrigger.Value = true
end
if chr:FindFirstChild("Stand") then
for i,v in pairs(chr.Stand:GetChildren()) do
v.Transparency = 1
end
end
deathsound(deathsfx,5,torso)
repeat wait() until not chr:FindFirstChild("Timestopper")
wait(1)
plr:LoadCharacter()
end
I don’t see anything wrong with this…