v = game.Part x = v.Name
{
[tostring(x)] = Workspace.Monsters["A1-A2"][tostring(x)]
}
I need it to become a table..
v = game.Part x = v.Name
{
[tostring(x)] = Workspace.Monsters["A1-A2"][tostring(x)]
}
I need it to become a table..
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.
5 comments
mhm, what is x?
can you at least have well named variables or full scripts?
x = game.Part.Name... Try workspace instead of game? Other than that, there isn't much we can do. There is very minimal information.
What is this.
use game.Workspace.Part.Name, not game.Part.Name