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

Apparently this table Nil?

v = game.Part x = v.Name

{
           [tostring(x)] = Workspace.Monsters["A1-A2"][tostring(x)]
}

I need it to become a table..

5 comments

0

mhm, what is x?

0

can you at least have well named variables or full scripts?

0

x = game.Part.Name... Try workspace instead of game? Other than that, there isn't much we can do. There is very minimal information.

0

What is this.

0

use game.Workspace.Part.Name, not game.Part.Name

1 answer

Assuming you have the part in workspace, you can use either of these to make a reference to it:

local v = workspace.Part
-- OR
local v = game.Workspace.Part

And no need to use the tostring() function on x, as it is already associated with a string(.Name)

local v = workspace.Part
local x = v.Name

local tab = {
	[x] = workspace.Monsters["A1-A2"][x]
}

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