Sorry for confusing title. I am having a mind blank and completely forgot how to reference a variable.
So this is what i want to do:
variable = part workspace.Folder.Model.*variablehere*.item
How would i do this? This isn't my actual script, just some place holders. But i want to set the variable value using remote events from another script, which i have done, then place that into my script. Here is a more accurate representation of what i want to do:
game.ReplicatedStorage.remoteevent.OnClientEvent:Connect(function(variablename) variable = variablename end) workspace.Folder.Model.*variablehere*.item
Sorry, is this confusing?
Any help would be appreciated.
To do this use the []
brackets without .
.
Here is an example:
local part = workspace.Part workspace[part]:Destroy()
You can also find items/values inside of it using:
local part = workspace.Part workspace[part].Value:Destroy()
Accept this if it worked/helped you get your final answer.