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

How do you make a bar go up when you dig a block? [closed]

Asked by 6 years ago

I have tryed stuff but it has not worked i need to figure out how the bar goes up once you dig a block.

Closed as Not Constructive by H4X0MSYT, Programical, and Shawnyg

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
1
Answered by
cailir 284 Moderation Voter
6 years ago

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!

0
Not constructive. H4X0MSYT 536 — 6y
Ad