Can someone fix this:
player = game.Players.LocalPlayer
mouse = player:GetMouse()
debounce = false
char = player.Character
script.Parent.Equipped:connect(function()
mouse.Button1Down:connect(function()
if debounce then return end
local distance = (char.Torso.CFrame.p - workspace.EXpodo1234ALTmodel.Torso.CFrame.p).magnitude
if distance < 26 then
debounce = true
game.ReplicatedStorage.RemoteEvent:FireServer()
local value = char.Backpack1.Handle.storage.SurfaceGui.Value.Value * 16
player.leaderstats.Words.Value = player.leaderstats.Words.Value + 5
local billboard = game.ReplicatedStorage.BillboardGui:Clone()
billboard.Parent = player.character.Head
billboard.TextLabel.Text = ("+6")
char.Backpack1.Handle.storage.SurfaceGui.Value.Value= char.Backpack1.Handle.storage.SurfaceGui.Value.Value + 5
char.Backpack1.Handle.storage.SurfaceGui.Frame.Size=UDim2.new(0,value,0,600)UDim2.new(0,value,0,600)
char.Backpack1.Handle.storage.SurfaceGui.TextLabel.Script.Disabled=true
wait()
char.Backpack1.Handle.storage.SurfaceGui.TextLabel.Script.Disabled=false
wait(1)
billboard.TextLabel.TextTransparency = 0.1
wait()
billboard.TextLabel.TextTransparency = 0.2
wait()
billboard.TextLabel.TextTransparency = 0.3
wait()
billboard.TextLabel.TextTransparency = 0.4
wait()
billboard.TextLabel.TextTransparency = 0.5
wait()
billboard.TextLabel.TextTransparency = 0.6
wait()
billboard.TextLabel.TextTransparency = 0.7
wait()
billboard.TextLabel.TextTransparency = 0.8
wait()
billboard.TextLabel.TextTransparency = 0.9
wait()
billboard.TextLabel.TextTransparency = 1
wait()
billboard:Remove()
debounce = false
end
end)
end)
Im testing out a sim game(im not actually making one) and that when you equip this tool i made you can click to get 5 words and it fills your bag and when i click the number on the value goes up by, but the frame i made behind it, doesn't go up depending on what how much the value is, though on the second click it does. This makes a space when the bag is full and i made that you can only click when your near a rig of myself i made, but i didnt make the when you fill your bag you cant click anymore bag part, but im making that soon and the sell part.

1 comment
We are not scriptersforhire.org. Do not ask for us to fix code for you.