I have tryed stuff but it has not worked i need to figure out how the bar goes up once you dig a block.
COMMUNITY QUESTION
How do you make a bar go up when you dig a block?
1 answer
Hi, Darthman522!
You can use a IntValue to do this!
First make this setup: http://prntscr.com/iyajgs
Then Frame is with background transparancy at 0 and the TextLabel is with TextTransparency at 0.
Modify the frame size (X) to the full bar X.
On this local script:
while wait() do
local value = script.Parent.Dig.Value
Size = value / 100
script.Parent.ScreenGui.Frame.TextLabel.Size = UDim2.new(Size, 0,0.2,0)
end
Just increment the "Dig" value by a value each block that player brake(Remember 1 = 1%, 50 = 50%, 100 = 100%)
And thats done!
Good luck with your game!
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Not constructive.