This script is supposed to give you a cup, but when you click it nothing happens. There are two scripts involved too. Here is the clicked script:
function clicked() game.Players.LocalPlayer.PlayerGui.Giver.Disabled = false wait(.3) game.Players.LocalPlayer.PlayerGui.Giver.Disabled = true end script.Parent.MouseClick:connect(clicked)
Here is the give script:
plr = game.Players.LocalPlayer clone = game.ServerStorage["Empty Cup"]:Clone() clone.Parent = plr.Backpack
They are both local scripts and there are no errors. I can't find anything wrong.
First off, a LocalScript cannot access ServerStorage. You'll have to move the Empty Cup into ReplicatedStorage, this way your LocalScript can access it.
Change line 2 to this-
clone = game:GetService("ReplicatedStorage")["Empty Cup"]:clone()
EDIT:
Use a GUI TextButton and place this LocalScript inside it
script.Parent.MouseButton1Down:connect(function() clone = game:GetService("ReplicatedStorage")["Empty Cup"]:clone() clone.Parent = game.Players.LocalPlayer.Backpack end)