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

Vector3 to UDim2?

Asked by 8 years ago

I'm trying to make a screen gui (frame) follow a part, and since the part's position is a Vector and not a UDim the gui is outside of the screen,

script.Parent.Position = UDim2.new(game.Workspace.Part.Position.X,game.Workspace.Part.Position.Y,game.Workspace.Part.Position.Z)

that is the code I have.

1 answer

Log in to vote
0
Answered by 8 years ago

For one thing, UDim2's require 4 arguments (ex: {1,0,0,100}), not just two. Second of all, the position of that part won't be relative to the position of your camera. So you would have to find the position/CFrame of that person's camera relative to the part's position.

Sorry if this isn't that detailed of an answer. I didn't really expect you to understand much of it, but using my explanation, create a new question including the explanation (if you didn't understand what I just said). From there, somebody else will be able to help you (I'm too busy at the moment).

0
Thank you, and I also understand that so don't worry. Harrison_Ford 5 — 8y
Ad

Answer this question