Hello, I have been trying for a while to make a give item to player GUI that is given to a special rank. But whenever the GUI is used it does nothing. Can someone please help me?
Local Script:
script.Parent.MouseButton1Click:Connect(function()
local player = game.Players.LocalPlayer
local user = script.Parent.Parent.Player.Text
game.ReplicatedStorage["662USP"]:FireServer(user)
end)
Script:
game.ReplicatedStorage["662USP"].OnServerEvent:Connect(function(user)
local USP = game.ServerStorage.USP:Clone()
local Players = game:GetService("Players")
local usern = Players:WaitForChild(user)
USP.Parent = usern.Backpack
end)