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

Why wont this work? Audio Scripting...

Asked by
lawui 5
10 years ago

So basically I'm trying to make music play on my game and I want the songs in order... For example song A plays, wait .5, then plays song B... And I have been stuck on this for about an hour

local a = Instance.new("Sound")

a.Name = "NHL 94 Theme Song"
a.Pitch = 1
a.SoundId = "http://www.roblox.com/asset/?id=150167727"
a.Volume = 1
a.Looped = false
a.archivable = false

local b = Instance.new("Sound")

b.Name = "Malo Mart Theme Song"
b.Pitch = 1
b.SoundId = "http://www.roblox.com/asset/?id=172027274"
b.Volume = 1
b.Looped = false
b.archivable = false

b.Parent = game.Workspace

wait(.1)

a:play()

wait (72)

b:play()
0
Beginers mistake :( lawui 5 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago

You need a capital P for Play.

local a = Instance.new("Sound")

a.Name = "NHL 94 Theme Song"
a.Pitch = 1
a.SoundId = "http://www.roblox.com/asset/?id=150167727"
a.Volume = 1
a.Looped = false
a.archivable = false

local b = Instance.new("Sound")

b.Name = "Malo Mart Theme Song"
b.Pitch = 1
b.SoundId = "http://www.roblox.com/asset/?id=172027274"
b.Volume = 1
b.Looped = false
b.archivable = false

b.Parent = game.Workspace

wait(.1)

a:Play()

wait (72)

b:Play()

Ad

Answer this question