server-side
local chosen = {unpack(multimaps)}
local m1 = chosen[math.random(1, #chosen)]
table.remove(chosen, table.find(chosen, m1))
local m2 = chosen[math.random(1, #chosen)]
table.remove(chosen, table.find(chosen, m2))
local m3 = chosen[math.random(1, #chosen)]
table.remove(chosen, table.find(chosen, m3))
mapvoting:FireAllClients(m1, m2, m3)
client-side
local player = game.Players.LocalPlayer
local mapvoting = game.ReplicatedStorage:WaitForChild("MapVoting")
local button = script:WaitForChild("Template")
mapvoting.OnClientEvent:Connect(function(m1, m2, m3)
local m1button = button:Clone()
wait()
m1button.Parent = player.PlayerGui.GameUI.MapVoting.Main
m1button.Text = m1.Name
end)
error
Players.woloexe.PlayerScripts.MapVoting:9: attempt to index nil with 'Name' - Client - MapVoting:9
14:07:39.070 Stack Begin - Studio
14:07:39.071 Script 'Players.woloexe.PlayerScripts.MapVoting', Line 9 - Studio - MapVoting:9
14:07:39.071 Stack End - Studio
please help im confused on why its not working