-
I want when i activate the tool its should open a gui and the bar will tween but its not working ;-;
-
What is the issue?
robloxapp-20200429-1713069.wmv (2.0 MB) -
What solutions have you tried so far? I tried to change the starter gui to the player gui but it doesnot work.
Here are the place of this script:
The script is a local script and its on The Iphone 6 Tool.
The Script in Text:
script.Parent.Activated:Connect(function()
local plr = game.Players.LocalPlayer
local BagValue = game.Players.LocalPlayer:WaitForChild('Backpack').BagMultiplier
local backpack = plr:WaitForChild('Backpack')
local waittime = backpack.WaitTime
local MaxBag = game.Players.LocalPlayer.Backpack.MaxBag
local Bag = game.Players.LocalPlayer:WaitForChild('leaderstats'):FindFirstChild('GB')
local gui = plr:WaitForChild('PlayerGui').HackBar
local debounce = false
if MaxBag.Value > Bag.Value then
if debounce == false then
debounce = true
gui.Enabled = true
gui.bar:TweenSize(UDim2.new(0.231, 0,0.031, 0),Enum.EasingDirection.Out,Enum.EasingStyle.Bounce,waittime.Value,false,nil)
Bag.Value = Bag.Value + BagValue.Value
gui.Enabled = false
gui.bar.Size = UDim2.new(0.002, 0,0.031, 0)
debounce = false
print(tostring(debounce))
end
else
print('Player bag is full')
end
end)
-- Show Size {0.231, 0},{0.031, 0}
-- Hide Size {0.002, 0},{0.031, 0}
Thanks,