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

How Can I Fix This?

Asked by 10 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

I Knew It Can Be This Simple Because It Doesn't Work! I'm New To Scripting And I'm Trying To Make A DJ booth?

Id = Script.Parent.Sound.Soundid
Sound = Script.Parent.Sound
Text = Script.Parent.Parent.Textbox.Text

function Music()
    Id = "http://web.roblox.com/Because-Im-Happy-32-540-Sold-item?id="..Text..""
    Sound:Play()
    Script.Parent.Parent:remove()
end

Script.Parent.MouseButton1Down:connect(Music)

0
The way you have it, the only thing that will play is "Because I'm Happy" and only when the correct id is entered. Can you tell why? GoldenPhysics 474 — 10y
0
Lol. that isn't how you use sound id's... EzraNehemiah_TF2 3552 — 10y
0
Calm down. Check out my answer. Also, Golden, that's not necessarily true. The id in the URL is really the important stuff. You can make the content say whatever you'd like. Shawnyg 4330 — 10y
0
Sorry About The Jerk Comment, I Just Got Mad Cause It Didn't work and i'm practically new to scripting colinthewierd 10 — 10y
0
It's fine.. if my answer helps, be sure to Accept it. Shawnyg 4330 — 10y

3 answers

Log in to vote
0
Answered by 10 years ago

I don't think you are using sound ID's properly. Here is the wiki link to using sounds. If it help let me know :D

http://wiki.roblox.com/index.php?title=Sounds

Ad
Log in to vote
0
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
10 years ago

Well, a few capitalization errors.

Id = script.Parent.Sound.SoundId
Sound = Script.Parent.Sound
Text = Script.Parent.Parent.Textbox

function Music()
    Id = "http://www.roblox.com/asset/?id="..Text.Text -- Incase it changes. Variable may not update
    Sound:Play()
    script.Parent.Parent:Destroy()
end

script.Parent.MouseButton1Down:connect(Music)


Log in to vote
-1
Answered by 10 years ago

You need to write three "end" and get the very last line before them. "end end end"

Answer this question