[Solved] Problem with :Play()

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
image

And yes, I do actually call the function :point_down:

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

No, its set to 2

image

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
image
Everything seems fine to me?

I see that it prints out 0.474, is that part of the sound value?

Before it gets cloned? Or after its parent is set

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

This is what it looks like, when its parent is set

image

Try kick.Playing = true :slight_smile: (character)

Doesn’t play auto set that to true?

I don’t see why you need it…

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?

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.

Are you destroying the effect part before the sound finishes playing?

I don’t know why it behaves like this, but I literally changed the RollOffMode from Inverse to Linear
And now it works :crazy_face:

1 Like