Hi I have been scripting this with some help and when I went to play with my friends the text button didn't work for anyone. It only worked in the test server with one player. Can you help?
plr = game.Players.LocalPlayer
price = 550
debounce = false
script.Parent.MouseButton1Click:connect(function()
if debounce then return end
local v = plr.leaderstats.Credits
debounce = true
if v.Value >= price then
plr.Backpack.ClassicSword.Configurations.LungeDamage.Value = 50
v.Value = v.Value - price
script.Parent.Parent.Buy.Visible = true
wait(0.2)
for i = 0.1,1,0.1 do
wait(0.1)
script.Parent.Parent.Buy.TextTransparency = i
end
script.Parent.Active = false
script.Parent.Visible = false
script.Parent.Parent.upgrade2.Active = true
script.Parent.Parent.upgrade2.Visible = true
script.Parent.Parent.error.Position = UDim2.new(0, 200, 0, 100)
script.Parent.Parent.Buy.Position = UDim2.new(0, 200, 0, 100)
print('You bought the item!')
else
print ('Cant buy item!')
script.Parent.Parent.error.Visible = true
for i = 0.1,1,0.1 do -- from 0.1 to 1 with 0.1 increments
wait(0.1)
script.Parent.Parent.error.TextTransparency = i
end
end
debounce = false
end)

3 comments
Is it part of a SurfaceGui or is it in the player?
player
actually someone answered this and when I tried yours my text didn't fade but the cool down worked, any way could you help with this since you are a pretty good scripter with all your games (I love) so could you help? https://scriptinghelpers.org/questions/20199/upgrades-saving-when-dying-and-make-the-upgrades-you-have-already-inactive-and-invisible