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

My sound creates, but doesn't play?

Asked by 4 years ago

Hi! I'm very confused here. I was trying to make a music script but it didn't play.

local w = game:GetService("Workspace")
local part = Instance.new("Part")
part.Parent = w
local sound = Instance.new("Sound") -- creates sound
sound.Parent = part
print("Made and assigned sound")
sound.SoundId = 700994872
print("Set sound id")
sound.MaxDistance = 10000000000
print("Sound distance worked")
sound.Volume = 1
print("Volume is one")
sound:Play()
print("sound played")

1 answer

Log in to vote
2
Answered by
Ziffixture 6913 Moderation Voter Community Moderator
4 years ago
local Part = Instance.new("Part"); Part.Parent = workspace

local Sound = Instance.new("Sound")
Sound.SoundId = "rbxassetid://"..700994872
Sound.Parent = Part
Sound:Play()
0
that's what i typed in iiDkOffical 109 — 4y
0
What Feahren typed in worked for me RazzyPlayz 497 — 4y
Ad

Answer this question