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

How do i make it so music plays when i execute this script? [closed]

Asked by 5 years ago

so in the script below, I have a phone that uses a keypad script, and it want it to play a sound if it senses that the models named "9" "1" AND "1" have been pressed. any help please?!

Code = "911"
Input = ""
0
please make an attempt, even a futile one, and tell us what went wrong, before just posting a problem theking48989987 2147 — 5y

Closed as Not Constructive by RubenKan

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 5 years ago

Sure thing of course. This server script / global script goes into your keypad keys.

Ready? Let's do it...

click = Instance.New("Click Detector")
click.Parent = script.Parent
click.Name = "press"

script.Parent.press.MouseClick:Connect(function()
if (script.Parent.Name == "1") or (script.Parent.Name == "9" then
game.ServerStorage.Music:Play() end

I'm apologizing for this head on, I will fix this and figure this out together. We're sort of a team now.

0
Please, if you're trolling, stop. :> TheeDeathCaster 2368 — 5y
Ad