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

  Workspace.Union.Script:4: invalid argument #1 (Vector3 expected, got Instance) error in script?

so ive got a error that said   Workspace.Union.Script:4: invalid argument #1 (Vector3 expected, got Instance) and idk how to fix it

here is the code:

while true do wait(0.3) for i = 1, 55, 1 do script.Parent.Position = script.Parent.Parent + Vector3.new(0.1,0.1,0.1) end end

2 comments

0

Please use code formatting. Don't know how? It's very simple. 1. Select your code, 2. Press the blue "lua" button, 3. Your done!

0

i noticed the bug when i posted this xd

1 answer

✓ Accepted answer

You did

script.Parent.Position = script.Parent.Parent + Vector3.new(0.1,0.1,0.1)

instead of

script.Parent.Position = script.Parent.Parent.Position + Vector3.new(0.1,0.1,0.1)

Errors like these are pretty self explanatory it's basically saying there needs to be a Vector3 in this line of code, but where the vector3 should be there was an instance, which is the Parent of script.Parent. There are different variations of this area like for example (number expected, got CFrame) so make sure you always make sure you're putting the right value in the right place.

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