Hello I am doing a script but I must recover the name on the part but when I do:
game.Workspace.Checkpoints.0
He tells me that there is a problem How to recover the part without modifying the name itself
Hello I am doing a script but I must recover the name on the part but when I do:
game.Workspace.Checkpoints.0
He tells me that there is a problem How to recover the part without modifying the name itself
Roblox has brackets and double quotes. Names that violate the name requirements like numbers, symbols, keywords, can be used by doing this (example)
workspace["0"].child
thats how it works, you dont use the first dot, but the second dot still must be there for the child if oyur trying to get one, and you just use [""].
hope this helps :3
Or you can use WaitForChild but that uses more space
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
I'm not sure you can have numbers as names, as all object names default to strings.
fool! he named an object an int. He's trying to index it but it appears as a number. It is possible to name objects numbers but you would have to use FindFirstChild, WaitForChild or ["0"] in this case. A loop works as well