Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Player map chooser help "Lua"?

Asked by 10 years ago

So, this is a hover over with the mouse on three pads that count votes for a map. It works but, in the next round, it just does not show the titles... anyway to fix this or just manipulate it?

function RandomizeMaps() List1 = Game.Lighting.List1:GetChildren() List2 = Game.Lighting.List2:GetChildren() List3 = Game.Lighting.List3:GetChildren() Randomize1 = List1[math.random(1,#List1)] Randomize2 = List2[math.random(1,#List2)] Randomize3 = List3[math.random(1,#List3)] Import1 = script.Maps.Map1 Import2 = script.Maps.Map2 Import3 = script.Maps.Map3 Import1.Value = Randomize1.Name Import2.Value = Randomize2.Name Import3.Value = Randomize3.Name end

function AddMaps() Voted1 = Game.Workspace.Lobby.Voting.Voted1 Voted2 = Game.Workspace.Lobby.Voting.Voted2 Voted3 = Game.Workspace.Lobby.Voting.Voted3 Map1 = script.Maps.Map1 Map2 = script.Maps.Map2 Map3 = script.Maps.Map3 if Voted1.Value > Voted2.Value and Voted3.Value then MapsAdd = Game.Lighting.List1:FindFirstChild(Map1.Value) Values = Game.Workspace.Chosen Values.Value = MapsAdd.Name MapsAdd:Clone().Parent = Game.Workspace MapsAdd:MakeJoints() elseif Voted2.Value > Voted1.Value and Voted3.Value then MapsAdd = Game.Lighting.List2:FindFirstChild(Map2.Value) Values = Game.Workspace.Chosen Values.Value = MapsAdd.Name MapsAdd:Clone().Parent = Game.Workspace MapsAdd:MakeJoints() elseif Voted3.Value > Voted1.Value and Voted2.Value then MapsAdd = Game.Lighting.List3:FindFirstChild(Map3.Value) Values = Game.Workspace.Chosen Values.Value = MapsAdd.Name MapsAdd:Clone().Parent = Game.Workspace MapsAdd:MakeJoints() else MapChoice = Game.Lighting.Maps:GetChildren() Picking = MapChoice[math.random(1,#MapChoice)] Values = Game.Workspace.Chosen Values.Value = Picking.Name MapsAdd = Game.Lighting.List1:FindFirstChild(Values.Value) MapsAdd:Clone().Parent = Game.Workspace MapsAdd:MakeJoints() end end

0
Edit your post to use code formatting. This is not legible. AxeOfMen 434 — 10y

Answer this question