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

Trying to get it to play when audio in for local player?

Trying to get it to play when audio in for local player

print("1")
local textbox = script.Parent 
local music = script.Parent.Music

while true do
	music.SoundId = "rbxassetid://" ..textbox.Text --What ever audio id in plays
	script.Parent.Music:Play()
end

1 answer

The code you currently have plays the music constantly every fraction of a second. Which means the music will play from the beginning every fraction of a second.

Do this instead.

print("1")
local textbox = script.Parent 
local music = script.Parent.Music

music.SoundId = "rbxassetid://" ..textbox.Text
script.Parent.Music:Play()

2 comments

0

Also make sure this is all in a local script somewhere localscripts can run

0

did this work? please mark it as accepted if it works.

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