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

Radio System Scripts [Not Working] ?

This is the place: http://www.roblox.com/Radio-System-Test-place?id=69780965 (It's uncopy-locked so you can see whats happening.

This is the order of the Model:

--[[
	- RadioModel (Model)
		-Script (Script)
			-ScreenGui
			
				-FRAME (Frame)
					-ScrollUpDown (Frame)
						-Choice_1 (TxtButton)
							-Script
						-Choice_2 (TxtButton)
							-Script
						-Choice_3 (TxtButton)
							-Script
						-Choice_4 (TxtButton)
							-Script
						-Choice_5 (TxtButton)
							-Script
						-Choice_6 (TxtButton)
							-Script
						-Choice_7 (TxtButton)
							-Script
					-AudioIDInsert (TxtBox)
					-Help (TxtButton)
					-SubmitButton (TxtButton)
					-AudioID (TxtLabel)
					
				-HELP (Frame)
					-Done (TxtButton)
						-Script
					-ImageLabel (ImgLabel)
					-Background (TxtLabel)
					-HeadTitle (TxtLabel)
					-Information (TxtLabel)
					
		-ClickPart (Part)
			-ClickDetector (ClickDetector)
			-Script
		-Music (Part)
			-Sound (Sound)
				-Script
		-Part (unnecessary)
		-Part (unnecessary)
--]]

The script below is the script in the "RadioModel.Script.ScreenGui.Frame.SubmitButton" (This Script is not working properly... Any fixes on this?) [I want the script to take the Audio ID that the player entered in the Text Box and put it at the end of "http://www.roblox.com/asset/?id=" and put it in "Sound.SoundID"

local Button = script.Parent
Frame = script.Parent.Parent


function onClick() 


Frame.Visible = false
a = script.Parent.Parent.AudioIDInsert.Text
game.Workspace.RadioModel.Music.Sound.SoundId="http://www.roblox.com/asset/?id=" .. a .. "" 

end 

Button.MouseButton1Click:connect(onClick)

The script below is the script in "RadioModel.ClickPart" (This Script is not working properly... Any fixes on this?) [I want the script to switch the visibility of the ScreenGui.Frame to true once the player clicks on the part] [I only want the GUI to be visible to the player who clicked the part ONLY though]

function onClicked(hit)
	check = hit.Parent:FindFirstChild("Humanoid")
if check ~= nil then
	local user = game.Players:GetPlayerFromCharacter(hit.Parent)

	user.PlayerGui.ScreenGui.Frame.Visible = true
	end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

Thanks for anyone trying to help.

1 comment

1

ugh this is useless...

1 answer

✓ Accepted answer

This is just a thought. For the first script that isn't working, line 9, you can't have properties defined as local, only objects, booleans, tables, and strings. So, just remove the .Text at the end, and at line 10, put ..a.Text...

Second script: "hit" is the actual player, not a part.

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