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

X cannot be assigned to Roblox scripting problem on Roblox.com?

I'm really bad at scripting and the script says "X cannot be assigned to." i dont know what to do and im really sad

1 comment

1

where's your code and what do you want it to do?

1 answer

You can't assign number values to axes individually, you must create a new Vector3. Say the erroring line in your script looks like:

workspace.Part.Position.X = 5

This won't work because you're attempting to set X to a number value, while it's a Vector. Instead this line should look like:

workspace.Part.Position = Vector3.new(5, 0, 0)

Let me know if this doesn't satisfy your question, I would be glad to try and fix it! Hope this helps!

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