phoniex
|
  |
| Joined: 03 Feb 2008 |
| Total Posts: 34985 |
|
|
| 09 Jan 2015 06:53 PM |
This script is supposed to play a certain sound when a player dies. Here's the line of code:
local sDied = newSound("http://www.roblox.com/asset/?id"OnDeath"")
"OnDeath" being the ID of the death sound. This line causes the script to return an error. How do I fix this?
~Rock is dead. Long live paper and scissors!~ |
|
|
| Report Abuse |
|
|
phoniex
|
  |
| Joined: 03 Feb 2008 |
| Total Posts: 34985 |
|
|
| 10 Jan 2015 10:19 AM |
BUMP
~Rock is dead. Long live paper and scissors!~ |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2015 10:20 AM |
local sDied = newSound("http://www.roblox.com/asset/?id=" .. OnDeath)
logic is logical |
|
|
| Report Abuse |
|
|
phoniex
|
  |
| Joined: 03 Feb 2008 |
| Total Posts: 34985 |
|
|
| 10 Jan 2015 10:30 AM |
@Devious
Thanks. However, I am encountering a new error. I moved the problematic line of the script to the line that I have already presented:
local sDied = newSound("http://www.roblox.com/asset/?id"..DeathSound(math.random(1,3))"")
"DeathSound" being a table of death sounds.
~Rock is dead. Long live paper and scissors!~ |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2015 11:43 AM |
local sDied = newSound("http://www.roblox.com/asset/?id="..DeathSound[math.random(1,#DeathSound)])
logic is logical |
|
|
| Report Abuse |
|
|
phoniex
|
  |
| Joined: 03 Feb 2008 |
| Total Posts: 34985 |
|
|
| 10 Jan 2015 12:19 PM |
@Devious
Works like a charm now. Thanks for your help.
~Rock is dead. Long live paper and scissors!~ |
|
|
| Report Abuse |
|
|