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

Why doesnt this work?

Asked by 8 years ago

I'm trying to make it so it CFrames it to the near the door, but it says "18:50:46.187 - CFrame is not a valid member of Model"

Help?

local Guy = game.Guy
Guy.CFrame = CFrame.new(Door.Position)
0
Is guy a model? docrobloxman52 407 — 8y
0
Yeah UltraUnitMode 419 — 8y

1 answer

Log in to vote
1
Answered by
drahsid5 250 Moderation Voter
8 years ago

You cannot set a CFrame value to a Vector3 value. To fix this you would write it like this:


local Guy = game.Workspace.Guy --Going to assume Guy is actually in Workspace Guy.CFrame = Door.CFrame --or Guy.CFrame = CFrame.new(Door.Position.x, Door.Position.y, Door.Position.z) --or Guy.Position = Door.Position -- would appear above the door because of how position --Okay so Guy is a apparently a model, to move a model you would do this: Guy:MoveTo(Door.Position)
Ad

Answer this question