Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 3 years ago

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

0
maybe you are too far away? Ferrarimami 120 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

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.

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. RetroGalacticGamer 331 — 3y
0
so i just replace the workspace in script with sound service and put the audio in sound service? skeletonpiratejack 13 — 3y
0
Skeleton try and put the sound in sound service, script in serverscriptservice. Nitrolux200 62 — 3y
0
Oh okay Retro, nvm. Nitrolux200 62 — 3y
Ad

Answer this question