Every time I call :Play() it just doesn’t play the sound, I’ve tried changing around the RollOffDistances
Nothing seems to fix my issue
I appreciate any help
Properties of the sound
My sounds are on as well:
And it gets cloned into the part, though no sound
And yes, I do actually call the function
function bamboo.effect(self)
do
local kick = storage.Effect.Kick:Clone()
kick.SoundId = "rbxassetid://8187671085"
kick.Parent = self.bamboo.Upper.effect
kick:Play()
debris:AddItem(kick, 1)
end
do
local particle = storage.Effect.Hit:Clone()
particle.Parent = self.bamboo.Upper.effect
task.wait(.25)
particle.Enabled = false
debris:AddItem(particle, 1)
end
end
What is it doing?
Instead of the desired outcome what happens?
It does create the particle and the sound, however it won’t play the sound.
printing in the console works. so I wonder what the issue is
Is the sound itself volume set to 0?
I changed it to
Though same result
function bamboo.effect(self)
local kick = storage.Effect.Kick:Clone()
kick.SoundId = "rbxassetid://8187671085"
kick.Parent = self.bamboo.Upper.effect
kick:Play()
debris:AddItem(kick, 1)
local particle = storage.Effect.Hit:Clone()
particle.Parent = self.bamboo.Upper.effect
task.wait(.25)
particle.Enabled = false
debris:AddItem(particle, 1)
end
Maybe try to swap the order of something?
Set the parent first then the sound id?
Order in code really matters.
I just tried it, doesn’t seem to work either
Printing out some more information about the sound itself
Everything seems fine to me?
I see that it prints out 0.474, is that part of the sound value?
mitex7183
(mitex)
January 14, 2022, 1:21pm
12
Before it gets cloned? Or after its parent is set
mitex7183
(mitex)
January 14, 2022, 1:23pm
14
No no, its the TimeLength, sorry for not clarifying it
function bamboo.effect(self)
local kick = storage.Effect.Kick:Clone()
kick.Parent = self.bamboo.Upper.effect
kick.MaxDistance = 100
print(kick.Volume, kick.SoundId, kick.TimeLength)
kick:Play()
debris:AddItem(kick, 1)
local particle = storage.Effect.Hit:Clone()
particle.Parent = self.bamboo.Upper.effect
task.wait(.25)
particle.Enabled = false
debris:AddItem(particle, 1)
end
mitex7183
(mitex)
January 14, 2022, 1:24pm
15
This is what it looks like, when its parent is set
Try kick.Playing = true (character)
Doesn’t play auto set that to true?
I don’t see why you need it…
mitex7183
(mitex)
January 14, 2022, 1:25pm
18
Do you mean like, playing the sound from the character?
Like setting the sounds parent to the humanoidrootpart for example?
Also do u want everyone to hear it or just the person who kicked the bamboo?
mitex7183
(mitex)
January 14, 2022, 1:27pm
20
I would like to make all people hear it, within a radius of ~50 to ~100 studs
It works for me when I used Playing = true.
NyrionDev
(Nyrion)
January 14, 2022, 1:28pm
22
Are you destroying the effect part before the sound finishes playing?
mitex7183
(mitex)
January 14, 2022, 1:28pm
23
I don’t know why it behaves like this, but I literally changed the RollOffMode from Inverse to Linear
And now it works
1 Like