Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I get the first value of a table?

So, I recently asked a question on the DevForums, and someone said that in this code:

character:FindFirstChild("HumanoidRootPart").CFrame = AvailableSpawnPoints.CFrame

"AvailableSpawnPoints is a table, consider getting the first value (as you remove the first value each time)"

How do I do that?

3 comments

0

rip

0

Don't forget to accept my answer if it solves your problem

0

k thanks

2 answers

✓ Accepted answer

Assuming AvailableSpawnPoints is an array, you can get the first element using arr[1], second element, using arr[2], ect

If you are using a dictionary, there isn't much you can do

character:FindFirstChild("HumanoidRootPart").CFrame = AvailableSpawnPoints[1].CFrame
also stop watching alvinbloxx, his videos suck

3 comments

0

oof

0

Thanks for the response!

0

New mod in town owo

u can use

t[n]

with t being the table / list and n being the numeric identifier for the value u want to take

This discussion is preserved as it was. New answers, comments, and votes are closed.