Город МОСКОВСКИЙ
00:11:30

как сделать свой меч (тутор по Roblox Studio)

Аватар
Roblox Studio Уроки и Туториалы
Просмотры:
1 585
Дата загрузки:
29.10.2023 22:26
Длительность:
00:11:30
Категория:
Лайфстайл

Описание

скрипты:
анимация:
local Tool = script.Parent
local AnimationR15 = script:WaitForChild("AnimationR15", 1)
local AnimationR6 = script:WaitForChild("AnimationR6", 1)

Tool.Activated:Connect(function()
local Character = Tool.Parent
if Character then
local Humanoid = Character:FindFirstChildWhichIsA("Humanoid")
if Humanoid then
local LoadedAnim = nil
if Humanoid.RigType == Enum.HumanoidRigType.R15 and AnimationR15 then
LoadedAnim = Humanoid:LoadAnimation(AnimationR15)
elseif Humanoid.RigType == Enum.HumanoidRigType.R6 and AnimationR6 then
LoadedAnim = Humanoid:LoadAnimation(AnimationR6)
end
if LoadedAnim then
LoadedAnim:Play()
end
end
end
end)



урон:
local hitbox = script.Parent.Blade

hitbox.Touched:Connect(function(hit)
local hum = hit.Parent:FindFirstChildWhichIsA("Humanoid")
hum:TakeDamage(20)
end)

Рекомендуемые видео