I have a sound inside a block when you colect it it does not make the sound for some reason and there is no errors and it continues with the rest of the script?
script.Parent.Part4.Touched:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr then
--make the part go to the players humanoid bace part by tweening it towards the player
local tweenService = game:GetService("TweenService")
local part = script.Parent
local goal = {}
goal.Position = plr.Character.HumanoidRootPart.Position
goal.Orientation = Vector3.new(0, 0, 0)
local tweenInfo = TweenInfo.new(0.4, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out)
local tween = tweenService:Create(part, tweenInfo, goal)
script.Parent.correct:Play() --play
tween:Play()
task.wait(0.4)
part:Destroy()
end
end)
Click on the sound “correct” in your Explorer window and in the Properties window click the green play button next to it. You may have set the volume too low.
You are destroying the Part with the sound in it .4 seconds after you Play it.
When you play the sound in the Explorer window does it take more than .4 seconds to play? Some sounds in the toolbox might be a few seconds long, but they are quiet for a short time before making sound when you play them.
It doesn’t matter if it’s in workspace or serverscriptservice. This is a server script so it would perform the same in workspace and serverscriptservice.
oh really? when i saw this post i put a script in serverscriptservice with a sound inside of it and tried playing it, it didnt work until i moved it to workspace
yeah thats why i asked if it was in serverscriptservice cause the sound they’re playing is in script.Parent meaning if it is in serverscriptservice it wont play