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

Why does my part not teleport if the part is navy blue? No errors



local TelePos = '-31, 34.5, -103.5'
local Part = game.Workspace.Part12

if Part.BrickColor == "Navy Blue" then
wait(2)
Part.Position = (TelePos)
end

No errors, the local script is in the part.

Wha I am trying to do: If the part is Navy blue than it teleports to the position in TelePos.

Not sure why this is not working any help would be appreciated

1 comment

0

Try my answer again.

1 answer

As you said, the LocalScript is inside the Part. If the part is in workspace, the LocalScript won't run, place somewhere that is listed in here.

https://developer.roblox.com/en-us/api-reference/class/LocalScript

Second, to update positions, you need to use Vector3.new(). Your code should be

local TelePos = Vector3.new(-31, 34.5, -103.5)

Lastly, to check brickcolors, you need to use BrickColor.new(). Your code should be

if Part.BrickColor == BrickColor.new("Navy blue") then

4 comments

0

did you mean to add 3 at the end of "BrickColor"?

0

stilll doesnt work I did everything you said (did not use the 3 at end of brickcolor)

0

Use "Navy blue", not "Navy Blue".

0

Uh yes, use Navy blue.

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