markaaron
|
  |
| Joined: 21 Feb 2011 |
| Total Posts: 455 |
|
|
| 30 Dec 2016 03:53 PM |
I'm using the BoomBox 3.0 Tool in my game and I'm trying to edit its script so I can block specific ids I don't want to be played but its not working and I can't figure out why...
This is the script: local blocklist = {'528390400','279736377'} local Tool = script.Parent local Handle = Tool:WaitForChild("Handle") local Remote = Tool:WaitForChild("Remote") local Sound = Handle:WaitForChild("Sound")
function onUnequip() Sound:Stop() script.Parent.Head.BillboardGui.Textbox.Text = "" end
function onActivate() Remote:FireClient(getPlayer(), "ChooseSong") end
function getPlayer() return game:GetService("Players"):GetPlayerFromCharacter(Tool.Parent) end
function playSong(id) id = id or "" for i =1,#blocklist do if blocklist[i] == id then script.Parent.Head.BillboardGui.Textbox.Text = "That ID has been blocked" else Sound:Stop() Sound.SoundId = "http://www.roblox.com/asset/?id="..id Sound:Play() end end end
function onRemote(player, func, ...) if player ~= getPlayer() then return end if func == "Activate" then onActivate(...) end if func == "PlaySong" then playSong(...) end end Remote.OnServerEvent:connect(onRemote) Tool.Unequipped:connect(onUnequip)
This is the part that I added that's not working: local blocklist = {'528390400','279736377'} for i =1,#blocklist do if blocklist[i] == id then script.Parent.Head.BillboardGui.Textbox.Text = "That ID has been blocked"
|
|
|
| Report Abuse |
|
|
markaaron
|
  |
| Joined: 21 Feb 2011 |
| Total Posts: 455 |
|
| |
|
markaaron
|
  |
| Joined: 21 Feb 2011 |
| Total Posts: 455 |
|
|
| 30 Dec 2016 06:26 PM |
| (Bump) "No one knows how to fox this?" |
|
|
| Report Abuse |
|
|
|
| 30 Dec 2016 06:31 PM |
we do its just all the smart scripters are hiding somewhere
This is siggy. he does not like people. he will bite |
|
|
| Report Abuse |
|
|
|
| 30 Dec 2016 06:51 PM |
do tostring(id) == blocklist[i] or whatever you did
you're comparing a string and a number for equality (which i believe doesn't work, only works for greater than or less than i think)
|
|
|
| Report Abuse |
|
|
markaaron
|
  |
| Joined: 21 Feb 2011 |
| Total Posts: 455 |
|
|
| 30 Dec 2016 08:44 PM |
| Could you put this into the script? I'm alittle confused on what part i paste this into. |
|
|
| Report Abuse |
|
|
markaaron
|
  |
| Joined: 21 Feb 2011 |
| Total Posts: 455 |
|
| |
|
markaaron
|
  |
| Joined: 21 Feb 2011 |
| Total Posts: 455 |
|
| |
|