Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

why does game.Workspace.sound:Play() doesn't play sound?

i am making a phobia game and i am tryna make heavy breathing so heres my code:

local ReplicatedStorage = game:GetService("ReplicatedStorage") 
local remoteEvent = ReplicatedStorage:WaitForChild("Briish")
local lighting = game:GetService("Lighting")

function onServerEvent(player)
	player.Character.Head.Transparency = 0
	player.Character.Humanoid:TakeDamage(1)
	lighting.ColorCorrection.Contrast = 12
	lighting.Blur.Size = 13232132231123
	game.Workspace.sound:Play()
end

remoteEvent.OnServerEvent:Connect(onServerEvent)




i already did sound:Play() but it doesnt play heres the property of the sound looped = false playing = false i made it so it cant play at the start of the game

1 comment

0

maybe you are too far away?

1 answer

why do you have sound in workspace... I'm no expert here but I always put my sound in SoundService. Try that! If it doesn't work i'll try and help you more by going in detail etc if i even can. hope this helps somehow :/ Also make sure that the name of the sound is the same that you are putting in the script.

4 comments

0

Because he is probably trying to create 3D sound. Sounds in soundservice don't have any real-world 3D mechanics, they just play the audio and that is it.

0

so i just replace the workspace in script with sound service and put the audio in sound service?

0

Skeleton try and put the sound in sound service, script in serverscriptservice.

0

Oh okay Retro, nvm.

This discussion is preserved as it was. New answers, comments, and votes are closed.