LuckyAura
|
  |
| Joined: 25 Jul 2009 |
| Total Posts: 4444 |
|
|
| 18 Apr 2016 07:09 PM |
I'm trying to edit a portal gun so that the portal rings are different colors but this won't work: (00000000 is where the id would be)
local beam = script.Parent local first = true
textures={"http://www.roblox.com/asset/?id=000000000","http://www.roblox.com/asset/?id=00000000","http://www.roblox.com/asset/?id=000000000","http://www.roblox.com/asset/?id=000000000"}
function setUpPortal(part)
if part.Parent:FindFirstChild("Humanoid") then beam:remove() end
beam.Mesh.MeshId = "http://www.roblox.com/asset/?id=3270017" beam.Mesh.TextureId = "http://www.roblox.com/asset/?id=000000000" beam.Mesh.TextureID = (math.random(1,#textures)) beam.Mesh.Scale = Vector3.new(10,10,10) beam.Anchored = true beam.CanCollide = false |
|
|
| Report Abuse |
|
|
Pyrondon
|
  |
| Joined: 01 Sep 2013 |
| Total Posts: 81 |
|
|
| 18 Apr 2016 07:15 PM |
You got a random number, but you didn't actually use the random number to get an ID from the table.
This line:
beam.Mesh.TextureID = (math.random(1,#textures))
should be:
beam.Mesh.TextureID = textures[math.random(1,#textures)]
Hope this helped. |
|
|
| Report Abuse |
|
|
LuckyAura
|
  |
| Joined: 25 Jul 2009 |
| Total Posts: 4444 |
|
|
| 18 Apr 2016 08:19 PM |
| @Pyrondon Not sure if it's working or not since the textures aren't showing up when I put my decal ID's in. Can't check to see what they are since Studio crashes for me.. |
|
|
| Report Abuse |
|
|