Mrcreeper Pro
Ученик
(62),
на голосовании
3 дня назад
короче, нашел в toolbox фонарик и зажигалку из игры DOORS там есть анимации, у меня они не работают, спрашивал у друзей, говорили что все норм, может что то в настройках сделать надо? помогите пж если что вот скрипт repeat task.wait() until script.Parent.Parent:FindFirstChild("Humanoid") local Humanoid = script.Parent.Parent:WaitForChild("Humanoid") local PlayIdle = false local DB = false local DB2 = true local AnimationsFolder = script.Parent.Animations local HoldClose = Humanoid:LoadAnimation(AnimationsFolder.idleclosed) local Hold = Humanoid:LoadAnimation(AnimationsFolder.idle) local Open = Humanoid:LoadAnimation( AnimationsFolder.open ) local Close = Humanoid:LoadAnimation(AnimationsFolder.close) local Relight = Humanoid:LoadAnimation(AnimationsFolder.relight)
script.Parent.Activated:Connect(function() if not DB and DB2 then DB = true DB2 = false Open:Play() script.Parent.Handle.sound_open:Play() script.Parent.Handle.Neon.PointLight.Enabled = true script.Parent.Handle.Neon.Attachment.ParticleEmitter.Enabled = true script.Parent.Handle.Neon.Attachment.Shiny.Enabled = true script.Parent.Handle.Neon.Attachment.SurfaceLight.Enabled = true script.Parent.Handle.Neon.LightAttach.SurfaceLight.Enabled = true task.wait(Open.Length) Hold:Play() HoldClose:Stop() PlayIdle = true task.wait(1.1) DB2 = true elseif DB and DB2 then DB = false DB2 = false Close:Play() script.Parent.Handle.sound_close:Play() script.Parent.Handle.Neon.PointLight.Enabled = false script.Parent.Handle.Neon.Attachment.ParticleEmitter.Enabled = false script.Parent.Handle.Neon.Attachment.Shiny.Enabled = false script.Parent.Handle.Neon.Attachment.SurfaceLight.Enabled = false script.Parent.Handle.Neon.LightAttach.SurfaceLight.Enabled = false task.wait(Close.Length) Hold:Stop() HoldClose:Play() PlayIdle = false task.wait(1.1) DB2 = true end end)
script.Parent.Equipped:Connect(function() if PlayIdle then Hold:Play() HoldClose:Stop() elseif not PlayIdle then Hold:Stop() HoldClose:Play() end end)
script.Parent.Unequipped:Connect(function() Hold:Stop() HoldClose:Stop() end) он их находит но скрипт не работает
если что вот скрипт
repeat task.wait() until script.Parent.Parent:FindFirstChild("Humanoid")
local Humanoid = script.Parent.Parent:WaitForChild("Humanoid")
local PlayIdle = false
local DB = false
local DB2 = true
local AnimationsFolder = script.Parent.Animations
local HoldClose = Humanoid:LoadAnimation(AnimationsFolder.idleclosed)
local Hold = Humanoid:LoadAnimation(AnimationsFolder.idle)
local Open = Humanoid:LoadAnimation( AnimationsFolder.open )
local Close = Humanoid:LoadAnimation(AnimationsFolder.close)
local Relight = Humanoid:LoadAnimation(AnimationsFolder.relight)
script.Parent.Activated:Connect(function()
if not DB and DB2 then
DB = true
DB2 = false
Open:Play()
script.Parent.Handle.sound_open:Play()
script.Parent.Handle.Neon.PointLight.Enabled = true
script.Parent.Handle.Neon.Attachment.ParticleEmitter.Enabled = true
script.Parent.Handle.Neon.Attachment.Shiny.Enabled = true
script.Parent.Handle.Neon.Attachment.SurfaceLight.Enabled = true
script.Parent.Handle.Neon.LightAttach.SurfaceLight.Enabled = true
task.wait(Open.Length)
Hold:Play()
HoldClose:Stop()
PlayIdle = true
task.wait(1.1)
DB2 = true
elseif DB and DB2 then
DB = false
DB2 = false
Close:Play()
script.Parent.Handle.sound_close:Play()
script.Parent.Handle.Neon.PointLight.Enabled = false
script.Parent.Handle.Neon.Attachment.ParticleEmitter.Enabled = false
script.Parent.Handle.Neon.Attachment.Shiny.Enabled = false
script.Parent.Handle.Neon.Attachment.SurfaceLight.Enabled = false
script.Parent.Handle.Neon.LightAttach.SurfaceLight.Enabled = false
task.wait(Close.Length)
Hold:Stop()
HoldClose:Play()
PlayIdle = false
task.wait(1.1)
DB2 = true
end
end)
script.Parent.Equipped:Connect(function()
if PlayIdle then
Hold:Play()
HoldClose:Stop()
elseif not PlayIdle then
Hold:Stop()
HoldClose:Play()
end
end)
script.Parent.Unequipped:Connect(function()
Hold:Stop()
HoldClose:Stop()
end)
он их находит но скрипт не работает