Scripting for a "Choose you're team" GUI

Hey Developers,
So I’m programming right now for a “Choosing teaming” GUI.

So I’ve checked my error It’s a “a.b” but I don’t know how to make it run correctly here is my code if anyone could please help me out with my little mistake.

local player=game.Player.LocalPlayer
local character

--Character Loading
player.CharacterAdded:connect(function(c)
	character=c
end)

--GUI Variables
local gui=player:WaitForChild("PlayerGui")
local ui=gui:WaitForChild("ui")

--Load assets
local assetObject=script:WaitForChild("Assets")
local assets={}
for a.b in next.assetObject:GetChildren() do
	asset[b.Name]=b 
end

Oh goodness, I misspelled “Your”

Change it from for a.b in to for a, b in

, instead of .
You’re trying to make 2 variables when you use a for loop, a would be the index and b would be the object.

Also, it would be in next assetObject:GetChildren() and not next.assetObject

2 Likes

Alright I’ll try that and see how it works out. Thanks!

So I put it in, and now the

isn’t working.? Could you help a bit more please?

The problem is you’re trying to access asset, when it’s assets.

Oh, I see my bad! I’ll fix it right now could you stay a bit more just in case I have more of a problem with my code.

Alright so I just finished my code, but now I have a issue It comes up with the Little red underscore on “.”
here is my part of the code:
function tween(t.s.d.p.o)

Next to the “t.s” the period between those it come sup with a error.

It’s supposed to be a comma , you keep putting periods .

EDIT: using a . tries to access the variable before like a table.