Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is it available to use colon two times in this script?

Hello, thanks for your coming. It is not a big question but I am just trying to know is it allowed to do this such as:

Instance.new(“Part”, game:GetService(“Workspace”)).Name = “test"
game:GetService(“Workspace”):WaitForChild(“test”).CFrame = CFrame.new(0,30,0)

I know that this script is unnecessary and you do not need to do that but I just came up this question while playing the game, is it allowed and available to do it?

1 comment

0

thanks for asking this

1 answer

✓ Accepted answer

This is definitely allowed and will work. I do recommend assigning the instance to a variable if you're going to reference it again though.

local test = Instance.new(“Part”, game:GetService(“Workspace”)).Name = “test"
test.CFrame = CFrame.new(0,30,0)

This discussion is preserved as it was. New answers, comments, and votes are closed.