#Door knocking animation
1 messages · Page 1 of 1 (latest)
isnt repeat until false the same as while true do
Idk I asked a developer of a game for the code cuz I loved the idea of the game
so basically a cameo in my game
this is what they gave me so yeah
so you want to play this animation when the sound is playing?
alright
so
just do it in .Played Event
in sound
it fires every time they sound is played
(which just means that the function sound:Play() is fired)
i would write you the code but i forgot how to add this code label in discord
three ` things
''' like that? '''
oh this one
ye
yes
alr
--you can write something like:
local sound = your_sound
sound.Played:Connect(function()
animation:Play()
)
it should work
is it possible with animation id or something?
local head = nail:WaitForChild("Head")
local knock =head:WaitForChild("knock")
local please = head:WaitForChild("pleaseopen")
repeat
knock:Play()
sound.Played:Connect(function()
animation:Play()
task.wait(2)
please:Play()
task.wait(3)
until false```
Something like this maybe?
local head = nail:WaitForChild("Head")
local knock =head:WaitForChild("knock")
local please = head:WaitForChild("pleaseopen")
repeat
knock:Play()
knock.Played:Connect(function()
animation:Play()
task.wait(2)
please:Play()
task.wait(3)
until false```
or this?
whats knock and please?
Knock is well knocking
yeah but i mean is it animation, sound
and please is just someone saying "please open the door"
?
local nail = script.Parent
local head = nail:WaitForChild("Head")
local knock =head:WaitForChild("knock")
local please = head:WaitForChild("pleaseopen")
knock.Played:Connect(function() -- this is an event and this code below will fire every time this knock sound is played
please:Play()
-- add more stuff here that will happen when the knock sound starts to play
end)
something like that
alr ill try