Okay so I have this textbutton that gives tools in a class and it works in solo mode but not in play mode. Here is my script:
wait(1)
button = script.Parent
local dbounce = false
function hi()
if dbounce == false then
dbounce = true
script.Parent.Parent.TextButton.LocalScript:Destroy() -- Note this is destroying a different script
game.ServerStorage.LinkedSword:clone().Parent = game.Players.LocalPlayer.Backpack
game.ServerStorage.LinkedPaintballGun:clone().Parent = game.Players.LocalPlayer.Backpack
for i = 0.3, 1, 0.1 do
wait(0.1)
script.Parent.BackgroundTransparency = i
script.Parent.Parent.BackgroundTransparency = i
script.Parent.Parent.TextButton.BackgroundTransparency = i
end
script.Parent.Parent.Visible = false
end
end
script.Parent.MouseButton1Click:connect(hi)
