JoshRBX
|
  |
| Joined: 19 May 2012 |
| Total Posts: 8778 |
|
|
| 26 Aug 2016 06:30 AM |
I'm making a model that redesigns ROBLOX's interface to give it a much cleaner and modern look. However, there are two scripts that aren't working in servers, but work absolutely fine in Solo Mode.
Can someone please tell me how to fix this?
I will give the first correct user 100R$. If you don't have a BC membership, I can give you the Robux through a group. I really just want a quick answer.
Health Script
local humanoid = script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid local currentHealth = humanoid.Health humanoid.HealthChanged:connect(function(health) local change = math.abs(currentHealth - health) currentHealth = health if currentHealth < 50 and currentHealth > 29 then script.Parent.Image = "rbxgameasset://Images/yellow" elseif currentHealth < 30 and currentHealth > 14 then script.Parent.Image = "rbxgameasset://Images/orange" elseif currentHealth < 15 then script.Parent.Image = "rbxgameasset://Images/red" else script.Parent.Image = "rbxgameasset://Images/green" end end)
Music Script
local music = script.Parent.Parent.music local musiclist = {"243372213", "438917260", "319758951", "155319906"} local musiclN = {"Twenty One Pilots - Stressed Out", "Twenty One Pilots - Heathens", "Flo Rida - My House", "Ariana Grande - Problem"} local c = 1 repeat if music.SoundId == nil then else music:Pause() end
music.SoundId = "rbxassetid://"..musiclist[c] script.Parent.Text = musiclN[c] while music.TimeLength == 0 do wait(1) print("Music loading..") end music:Play() wait(music.TimeLength) if c == #musiclist then c = 1 else c = c + 1 end until nil
Thanks to anyone for trying to help!
- 𝑱𝒐𝒔𝒉𝑹𝑩𝑿 - |
|
|
| Report Abuse |
|
|
JoshRBX
|
  |
| Joined: 19 May 2012 |
| Total Posts: 8778 |
|
| |
|
JoshRBX
|
  |
| Joined: 19 May 2012 |
| Total Posts: 8778 |
|
| |
|
AxonMega
|
  |
| Joined: 29 Aug 2014 |
| Total Posts: 2403 |
|
|
| 26 Aug 2016 07:10 AM |
My guess is that you are having content issues:
1.) Use this URL instead: "http://www.roblox.com/Asset?id=" .. id
2.) Use the ContentProvider service to preload the assets. http://wiki.roblox.com/index.php?title=API:Class/ContentProvider
3.) Make sure you own all of the assets u r using. |
|
|
| Report Abuse |
|
|
Talaire
|
  |
| Joined: 21 Jun 2013 |
| Total Posts: 959 |
|
|
| 26 Aug 2016 07:21 AM |
What Axon said. To clarify, most of the time, "rbxgameasset://Images/green" will not make anything appear.
|
|
|
| Report Abuse |
|
|
KreoBox
|
  |
| Joined: 24 Aug 2016 |
| Total Posts: 356 |
|
|
| 26 Aug 2016 07:32 AM |
"What Axon said. To clarify, most of the time, "rbxgameasset://Images/green" will not make anything appear. "
That isn't what (s)he was saying at all, and shows how little you know.
|
|
|
| Report Abuse |
|
|
JoshRBX
|
  |
| Joined: 19 May 2012 |
| Total Posts: 8778 |
|
|
| 26 Aug 2016 07:59 AM |
Thanks, Axon! I have been able to solve the health GUI problem using the content preloading method. Send me a PM, and I'll give you 72R$ (50R$ after tax) if you want it! I still can't figure out the music player though. If you have any more suggestions, please let me know. I'll post the updated music player script that I'm working with in a new thread for the other 50R$. |
|
|
| Report Abuse |
|
|