Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I need make frame that tween depends on value or health of player?

Hello I just want make when value is 55 the size of frame will smaller and when 100 it's be back again Here is my script

script.Parent.OxygenValue:GetPropertyChangedSignal("Value"):Connect(function()
	local Change = UDim2.new(script.Parent.OxygenValue.Value/100*0,0,0.32)
	script.Parent.GreenOxygen:TweenSize(Change)
end)

Results: https://www.dropbox.com/s/evk3bid060f75tq/pVIcke3QRn.mp4?dl=0 I want like in this video: https://www.youtube.com/watch?v=cYPB3BX_p6Q&t=4s

4 comments

0

Use the lua button instead of the . Your code looks messy if you don't use it.

0

stp and better help me

0

I'm trying to help you so that people may understand your code. Since I can't understand since you used , it looks messy. Here's how to post good questions: https://scriptinghelpers.org/help/how-post-good-questions-answers

0

Closing this question due to your attitude towards people who are attempting to help. Consider it a warning before I suspend your account.

1 answer

Just continously update your GUI like this:

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()

char.Humanoid.GetPropertyChangedSignal("Health"):Connect(function()
	script.Parent.Size = Udim2.new(char.Humanoid.Health / 100,0,0.05,0)
end)

Hope this helped!

5 comments

0

....... Are you serius ??? LOOK https://i.imgur.com/QMVoARq.png

0

I have value that I want work with

0

Really ,????????? LOK AT MY SCRIPT IM GOING MAD STOP DOING ME MAD MORE

0

@vojta1587 I reported you for being rude to people. We wanna help you, but if you're gonna be rude. then no.

0

You are off-topic stop doing me mad, You can¨'t look in my topic I see what I doing no

This discussion is preserved as it was. New answers, comments, and votes are closed.