In-game, the bars do not even show. Based on my previous tests with this, I believe the bars are not showing because the math is wrong and the SliceCenter points’ X values are too large.
Example of it broken in game
You can even notice how the right side of the background frame is sized incorrectly.
9Slice (which uses SliceCenter) is supposed to be used to set the proper boundaries of 9 separate areas inside an image. Instead of setting it (in real-time) to approximate how you’d want the bar to be stretched, why don’t you just set it properly once and adjust the Size instead?
Here’s a 9slice tutorial I found that might help you. Set your bars’ Y values to something constant, and change the fill bar’s X Scale to match what XP currently is. Like this: FillBar.Size = UDim2.new(CurrentXP/TotalXP,0,YScale,YOffset)
The 9slice feature should automatically apply borders. If you still want to see the size of the image (as it’s shown in Roblox, not the dimensions that SliceCenter actually takes into consideration) AbsoluteSize is your friend.