Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Error "Y cannot be assigned to" in script, but Y? A CFrame Cordinate scipt that stumped me.

Asked by
gmod419 23
5 years ago
Edited 5 years ago

How do I take the CFrame of an object, paste it onto a torso, then, using Y cordinate, subtract 3 and add by half of the objects size.

ObjectClone.CFrame.Y = (ObjectClone.CFrame.Y - 3) +(ObjectClone.Size.Y / 2)

This is what I have buy I get the error Y cannot be assigned to on this line and I can't figure it out.

0
Also the line before this makes Object Clone's CFrame = to Torso CFrame gmod419 23 — 5y
0
Why do you need to use CFrame.Y instead of CFrame? Just use CFrame instead. And why would you just add the CFrame to it's size, just why? cherrythetree 130 — 5y
0
now I have this ObjectClone.CFrame = Character:FindFirstChild("Torso").CFrame - Vector3.new(0, 3 - (ObjectClone.Size.Y / 2), 0) but it still dosen't work, but no errors gmod419 23 — 5y
0
I need it to be on the ground https://gyazo.com/676067ac8d262e2fa47cf1e654510fd4 gmod419 23 — 5y
View all comments (2 more)
0
Im not sure that Y is a member of CFrame... Use CFrame by itself such as: CFrame.new(x,y,z) VVickedDev 54 — 5y
0
I'll be removing this question later but Im sorry for the inconvience, used instance.new("Weld") instead of instance.new("WeldConstraint") and welds move parts to the center of eachother. :/ gmod419 23 — 5y

Answer this question