button = script.Parent function removeGUI() wait(1) script.Parent.Parent.Visible = false -- this is the part works fine wait() gun = game.Lighting.LinkedPaintballGun:Clone() gun.Parent = game.Players. -- this is the part that i am stuck on, i know what to do but there sint a backpack where i can put the gun in end button.MouseButton1Click:connect(removeGUI)
Ok let's say this was a TextButton part of a Frame.
Like this
ScreenGui
Frame
TextButton
This is the script inside the TextButton
button = script.Parent player = script.Parent.Parent.Parent.Parent button.MouseButton1Click:connect(function() wait(1) script.Parent.Parent.Visible = false -- this is the part works fine wait() gun = game.Lighting.LinkedPaintballGun:Clone().Parent = player:WaitForDataReady("Backpack") end)
This will only work if you follow the order, just in-case it fails.
If this helped +1, if this answered your question check-mark :)