I want to make an user chose there gravity but the code i am using it does not work. This is the code:
local TextBox = script.Parent.Parent.TextBox game.Workspace.Gravity = TextBox
I'm assuming you just started in Lua, but the reason it is not working is because you need to use the TextBox's 'Text' value so the gravity can actually change. This is what you'd do:
local TextBox = script.Parent.Parent.TextBox game.Workspace.Gravity = TextBox.Text
When you have it as that, it will detect a numerical value to set your gravity to, like 100.
Hoped this helped!