lastSpawn = nil faces = script.Parent.Parent.Parent.Pants:GetChildren()--folder with lots of string values Face = script.Parent.Parent.Parent.Dummy.Head.Face.Texture--face script.Parent.MouseButton1Click:connect(function() repeat curSpawn = faces[math.random(1,#faces)] until curSpawn ~= lastSpawn lastSpawn = curSpawn wait() --Let the Character fully load Face = curSpawn.Value end)
So I have this gui and I am using 3D Module, I want to make a button that press like press the button face I want it to random generate a random face. So there isn't error showing up BUT the texture of the face doesn't change and also how can I make the 3D module change too.
The reason it doesn't change is because you can't assign properties to variables. To fix this, you should change it to the following:
lastSpawn = nil faces = script.Parent.Parent.Parent.Pants:GetChildren()--folder with lots of string values Face = script.Parent.Parent.Parent.Dummy.Head.Face--face script.Parent.MouseButton1Click:connect(function() repeat curSpawn = faces[math.random(1,#faces)] until curSpawn ~= lastSpawn lastSpawn = curSpawn wait() --Let the Character fully load Face.Texture = curSpawn.Value end)
I'm not sure if there are any other errors with this, but I cannot see any.
Unfortunately, I am unable to help you with this '3D Module', however.