Problem: The Following script will not change the size of the bar(a frame) when value changes, I have checked while playing in studio and the Value DOES change. It is a number value
No output Errors
I debuged It and it stops printing at Val.Changed/Bar:Tween
Update: I have now found out that it does fire the function when the value changes but the gui does not tween, this script is in the frame I want to tween, yes I have tried to use script. Parent
Script
local Val = script.Parent.Parent:WaitForChild('MyThirst')
local Bar = script.Parent
local Size = .02 * Val.Value
Val.Changed:connect(function(NewValue)
Bar:TweenSize(UDim2.new(.02 * NewValue, 0,0.44, 0))
end)
I have also tried
local Val = script.Parent.Parent.MyThirst
local Bar = script.Parent
local Size = .02 * Val.Value
Val.Changed:connect(function(NewValue)
Bar:TweenSize(UDim2.new(Size, 0,0.44, 0))
end)
Also tried
local Val = script.Parent.Parent:WaitForChild('MyThirst')
local Bar = script.Parent
local Size = .02 * Val.Value
Val.Changed:connect(function(NewValue)
Bar:TweenSize(UDim2.new(.02 * NewValue, 0,0.44, 0),1)
end)

2 comments
Have you tried Val.Value.Changed
Yes, I was told you weren't dapper to do that though