How to i get the percent of an guiobject pos

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    i want to get the percent of an guiobject relatively to its parent

  2. What is the issue? Include screenshots / videos if possible!
    does not work right

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    i fond lerp but that does not work

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

local offsetx = script.Parent.Picker.AbsolutePosition.X
local mouse = game.Players.LocalPlayer:GetMouse()
local runservice = game:GetService("RunService")
runservice.RenderStepped:Connect(function()
	script.Parent.Picker.Position = UDim2.fromOffset(mouse.X-offsetx,0)
end)
runservice.Heartbeat:Connect(function()
	local thenumber = script.Parent.Picker.AbsolutePosition.X / script.Parent.AbsoluteSize.X-----
	print(thenumber)--should give a value 0 to 1
	script.Parent.TheNumber.Value = thenumber
end)

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

If I’m understanding this correctly I believe you need

(picker.AbsolutePosition.X-pickerParent.AbsolutePosition.X)/pickerParent.AbsoluteSize.X 
-- The parentheses are very important if they aren't there the division will be done first and you will not get the correct answer