Как создать killBlock и damageBlock в roblox studio
Скрипты: Кил Блок: killBlock = script.Parent function onTouched(hit) character = hit.Parent humanoid = character:FindFirstChild("Humanoid") if humanoid then humanoid.Health = 0 end end killBlock.Touched:Connect(onTouched) Дамаг Блок: dmgBlock = script.Parent function onTouched(hit) character = hit.Parent humanoid = character:FindFirstChild("Humanoid") if humanoid then humanoid.Health -= 5 end wait(5) end dmgBlock.Touched:Connect(onTouched)
Скрипты: Кил Блок: killBlock = script.Parent function onTouched(hit) character = hit.Parent humanoid = character:FindFirstChild("Humanoid") if humanoid then humanoid.Health = 0 end end killBlock.Touched:Connect(onTouched) Дамаг Блок: dmgBlock = script.Parent function onTouched(hit) character = hit.Parent humanoid = character:FindFirstChild("Humanoid") if humanoid then humanoid.Health -= 5 end wait(5) end dmgBlock.Touched:Connect(onTouched)



