You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I need the scale to work, for example, as a player’s health scale. -
What is the issue? Include screenshots / videos if possible!
The scale does not work correctly, it shifts to the left, although I did not ask it to. And it still needs to be reduced on the one hand. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Not sure where it’s going…
local ScaleFrame = script.Parent.ScaleFrame
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out, 0, false, .3)
local LightZone = game.Workspace.LightZone
local Debounce = false
LightZone.Touched:Connect(function (otherPart)
if otherPart and not Debounce then
Debounce = true
TweenService:Create(ScaleFrame, tweenInfo, {Size = UDim2.new(0,ScaleFrame.Size.X.Offset - 50,0,ScaleFrame.Size.Y.Offset)}):Play()
task.wait(.3)
Debounce = false
end
end)