I wanted to randomly change the position of 2 parts called “StartPos and EndPos” by using:
local StartPos,EndPos = script.Parent,workspace.EndPos
while true do
StartPos.Position.X = EndPos.Position.X == math.random(-300,200)
StartPos.Position.Y = EndPos.Position.Y == math.random(-200,286)
but I was met with “X cannot be assigned to”.
I would appreciate it if someone can tell me what did I do wrong, thank you!
You can’t assign a boolean to it, when you declare “EndPos.Position.X == math.random(-300,200)” you really are asigned a boolean value. Apparently you need declare a position and then you match the positions. I don’t understand what you did. Can you explain me?