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

attempt to call global 'Vector3' (a table value) error. What is causing it?

Haven't used the site in a while, and haven't been scripting for a while either. I have this script here that changes the position of a part every 2 seconds. It is in a local script, in StarterPlayerScripts. But the error is attempt to call a table value, but I don't understand it. It happens on line 2.

while true do
  workspace.MovingPart.Position = Vector3(15, 15, 15)
  wait(2)
  workspace.MovingPart.Position = Vector3(0, 0.5, 0)
  wait(2)
end

2 comments

0

Any help is appreciated

0

ERM it is supposed to be in a script in workspace or in serverscriptservice

2 answers

✓ Accepted answer

been waiting forever for a question but the fix is just do vector3.new(numbers)

1 comment

0

Thank you! This worked, I'm so stupid. I appreciate the help. I gave an upvote.

while wait do -- makes a loop
wait() 
game.workspace.MovingPart.Position = Vector3.new(15, 15, 15) -- u had to add Vector3.new bcz if u just do vector3 it will think its a table wish it isnt srry im bad at explaining lol
wait(2) -- wait 2 seconds
game.workspace.MovingPart.Position = Vector3.new(15, 15, 15)
wait(2)
end

1 comment

0

you should keep it as "while true do" and try not to add useless comments such as "wait 2 seconds", not trying to be rude just trying to improve your answer.

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