I've tried quotes and apostrophes.
I want to make it so script.Parent.Parent.Seasoner - 1200 has the Seasoner - 1200 Identified as a model.
Edit: I know I can change the name but I don't want to, for neatness purposes, it's a tycoon.
You can use square brackets to contain a name with spaces into a string. So for example, you can do ["Seasoner - 1200"]
to get the object with that name.
Example:
script.Parent.Parent["Seasoner - 1200"] --Notice how there's no dot after the Parent before the "Seasoner - 1200" in square brackets. Treat the class structure as a table for names with spaces.
Also, this works for names without spaces, variables, etc.
Marked as Duplicate by adark and Perci1
This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.
Why was this question closed?