#sounds not playing

55 messages · Page 1 of 1 (latest)

wraith robin
#

local prompt = script.Parent
local glass = script.Parent.Parent.Parent.Glass1
local glassFolder = script.Parent.Parent.Parent.Glass2 -- Folder or Model containing the unions

local money = game.Workspace:WaitForChild("GetMoney").Jewelvalue.Value

local music = game.Workspace:WaitForChild("soundarea").Music
local alarm = game.Workspace:WaitForChild("soundarea").alarm
local breakk = game.SoundService.GlassBroking

prompt.Triggered:Connect(function()
glass.Transparency = 1
glass.CanCollide = false
for _, obj in pairs(glassFolder:GetChildren()) do
if obj:IsA("UnionOperation") then
-- Modify the properties of all unions inside Glass2
obj.CanCollide = true -- Ensure it looks like glass
obj.Transparency = 0.6 -- Light blue tint
end
end
prompt.Enabled = false
money += math.random(100, 300)
print("Money got: "..money)
if alarm.Playing == false then
alarm:Play()
end
if music.Playing == false then
music:Play()
end
breakk:Play()
task.wait(300)
prompt.Enabled = true
glass.Transparency = 0.6
glass.CanCollide = true
for _, obj in pairs(glassFolder:GetChildren()) do
if obj:IsA("UnionOperation") then
-- Modify the properties of all unions inside Glass2
obj.CanCollide = false -- Ensure it looks like glass
obj.Transparency = 1 -- Light blue tint
end
end
end)

sour violet
wraith robin
#

bruh

sour violet
#

it makes it easier to read

wraith robin
#

it takes long to find the website

sour violet
#

cause colors

#

u dont need a website

wraith robin
#

idk how to write thesde symbols

sour violet
#

`

#

on phone its on the second page

#

on pc its next to the 1

wraith robin
#
local prompt = script.Parent
local glass = script.Parent.Parent.Parent.Glass1
local glassFolder = script.Parent.Parent.Parent.Glass2  -- Folder or Model containing the unions

local money = game.Workspace:WaitForChild("GetMoney").Jewelvalue.Value

local music = game.Workspace:WaitForChild("soundarea").Music
local alarm = game.Workspace:WaitForChild("soundarea").alarm
local breakk = game.SoundService.GlassBroking

prompt.Triggered:Connect(function()
    glass.Transparency = 1
    glass.CanCollide = false
    for _, obj in pairs(glassFolder:GetChildren()) do
        if obj:IsA("UnionOperation") then
            -- Modify the properties of all unions inside Glass2
            obj.CanCollide = true -- Ensure it looks like glass
            obj.Transparency = 0.6  -- Light blue tint
        end
    end
    prompt.Enabled = false
    money += math.random(100, 300)
    print("Money got: "..money)
    if alarm.Playing == false then
        alarm:Play()
    end
    if music.Playing == false then
        music:Play()
    end
    breakk:Play()
    task.wait(300)
    prompt.Enabled = true
    glass.Transparency = 0.6
    glass.CanCollide = true
    for _, obj in pairs(glassFolder:GetChildren()) do
        if obj:IsA("UnionOperation") then
            -- Modify the properties of all unions inside Glass2
            obj.CanCollide = false -- Ensure it looks like glass
            obj.Transparency = 1  -- Light blue tint
        end
    end
end)
#

now good? @sour violet

sour violet
#

yep

wraith robin
#

so do you know why it doesnt play the sounds?

sour violet
#

try printing alarm and music and their .Playing variables above the .Playing if statements

#

see what it says

wraith robin
#

i dont understand

#

oh that+

#

ah

#

it says true and false

sour violet
#

so it says one is already playing?

wraith robin
#

ig so

#

but when i look in explorer none are set to playing

crude cargo
#

this is local script?

sour violet
#

if u press play locally and check explorer on server it wont show no

wraith robin
#

normal script

#

huh the sounds arent even there when i play the game

crude cargo
wraith robin
#

i did its loud enough

#

i think my studio is bugged

#

its also lagging for some reason when i play

#

but 5 mins ago it didnt

crude cargo
#

try using print to debug

wraith robin
#

i did

#

and nothing shows up anymore

crude cargo
#

put it inside the if statement

wraith robin
#

although i didnt do anything

#

i did

#

im onna reinstall studio wait

crude cargo
#

hold on

#

why are u using if statement?

#

cant you just do

#

sound.Ended:Wait()

#

@wraith robin

sour violet
#

Why?

crude cargo
#

wdym why

sour violet
#

Hes checking if the sound is already playing. If it is, then it continues, if it isnt, it plays it

#

Why would he wait before the sound ends

wraith robin
#

omg i fixed it i think

crude cargo
#

ok

wraith robin
#

i didnt cnchor the part with the sounds

crude cargo
#

oh yea mb

wraith robin
#

btw can you help me with something else?