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

How do I convert a Vector3 value to and from a String value?

Asked by 6 years ago

I'm designing a GUI to allow a player to input a custom VertexColor` for some meshes thats used for a hair in a morph room. The only issue is that I'm unable to find a way to use String values and Vector3 Values.

Display.Click.MouseClick:Connect(function(player)
    Display.SurfaceGui.Vertex.Text = player.DATA.HairColor.Value --Vector3 value
end)


Clear.Click.MouseClick:Connect(function(player)
    Display.SurfaceGui.Vertex.Text = "[1,1,1]" --String Value
end)

The player has a configuration folder storing the data which is where I'm storing the value to be stored. Theres a display board to display the current value they're using. Is there something that uses both or a way to convert between the two?

0
I am not sure how you want to use this so I cannot answer this question. Do you want to be able to edit the text then update the vector3? User#5423 17 — 6y
0
Or just enter new values in the text bot to update the vector3. There are a lot of ways this can be done. User#5423 17 — 6y
0
I'm not sure what you're asking but Lua has the tostring() and tonumber() methods for converting between the two. Cousin_Potato 129 — 6y

Answer this question