Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[SOLVED] Expected identifier for unknown reason. any solution?

Asked by 1 year ago
Edited 1 year ago

Hi i wanted to do a script that teleports you to position. that was not a problem but i used local part for the teleport script to get the part Position but it game a error and i have no idea why.

script:

local teleportPart = workspace.MAP.["Stone Portal"].MAINPART.WinnerPart

game.Players.LocalPlayer.Character:MoveTo(teleportPart.Position)

Error: :1: Expected identifier got '['

1
write workspace.MAP["Stone Portal"] instead of workspace.MAP.["Stone Portal"] (see no dot between MAP and ["Stone Portal"]) imKirda 4491 — 1y
0
this time it shows this error: Stone Portal is not a valid member of folder MAP superaceCZ 28 — 1y
0
make sure Stone Portal is in the MAP, but if it is, where is this script located and do you want to teleport the player to the portal after spawn or somewhere after touch of a button? imKirda 4491 — 1y
0
it was not in MAP and one more folder i forgot its fixed. superaceCZ 28 — 1y

Answer this question