Hey guys. I've been trying to make a script that subtracts the position by .1 and the size by .2, so that it looks like sliding glass. This is my loop:
Shield = script.Parent while script.Parent.Size.Y > 0.2 do Shield.Size.Y = Shield.Size.Y - .2 Shield.CFrame.Y = Shield.CFrame.Y - .1 wait(.05) end script.Parent.CanCollide = false
The error it throws is as follows:
Y cannot be assigned to Script 'Workspace.Shield.Script', Line 4
Thanks in advance,
Aurum
Well... I'm not sure why you get that error, so this solution may not work, but instead of modifying just the Y part of the Vector3Value, subtract a whole Vector3 like this
Shield.Size = Shield.Size - Vector3.new(0, 0.2, 0) Shield.CFrame = Shield.CFrame - Vector3.new(0,0.1,0)
Let me know if that works!