I have no idea what this error means.
21:27:06.767 - Players.Player1.PlayerGui.LocalScript:5: bad argument #2 to 'random' (interval is empty) 21:27:06.771 - Script 'Players.Player1.PlayerGui.LocalScript', Line 5 21:27:06.774 - Stack End
Script:
faces = {face1 = "http://www.roblox.com/asset/?id=162384466",face2 = "http://www.roblox.com/asset/?id=162387197",face3 = "http://www.roblox.com/asset/?id=162387541"} h = script.Parent.Parent.Character.Head player = game.Players.LocalPlayer hft = h.face.Texture rm = math.random(1,#faces) hft = rm
I have all the asset ids right cause i -1 them all so I don't know whats going on now. Please help! Thanks!
faces is a dictionary instead of an array, so it returns nil. So the math.random sees (1, nil), then It will tell you interval is empty, because a required argument is not found (nil = nothing) Solution: turn it into an array and I will get you a bonus, get it working from what I see
faces = {"http://www.roblox.com/asset/?id=162384466", "http://www.roblox.com/asset/?id=162387197","http://www.roblox.com/asset/?id=162387541"} rm = math.random(1,#faces) script.Parent.Parent.Character.Head.face.Texture = faces[rm]
I've tested it
By the way, repeatedly asking will get you anywhere.