script.Parent.Touched:Connect(function(p) if p.Parent:FindFirstChild("Humanoid")then p.Parent.Humanoid.WalkSpeed = 0 end workspace["Existing 1"] end)
Whenever I name something in workspace that has a space in it it highlights it in a script with something like ["This"] and I cannot really continue coding after that because it wont connect.
Be aware I am new to Lua.
This is simply how you approach the ObjectValue
of an instance with whitespace in its name. For example, if I have a part in the workspace named Test Part
, to get the ObjectValue
of the instance, we write workspace["Test Part"]
Attempting to write it another way, such as workspace.Test Part
will error.
Thus, in your case, let's say you wanted to change the Name
of the Existing 1
instance in your game. We can write `workspace["Existing 1"].Name = "New Name"
Let me know if you have any further questions.