Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How Can I Fix This?

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)

5 comments

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?

0

Lol. that isn't how you use sound id's...

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.

0

Sorry About The Jerk Comment, I Just Got Mad Cause It Didn't work and i'm practically new to scripting

0

It's fine.. if my answer helps, be sure to Accept it.

3 answers

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)


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

This discussion is preserved as it was. New answers, comments, and votes are closed.