I'm not the best scripter, but I want to know how I can make it so when a player clicks it once they get the tool ( That part's done ) But when they click it again it doesn't give it to them because it's in their inventory. I've been thinking about how to approach this but it's kinda difficult.
local CupGiver = script.Parent
local Detector = CupGiver.ClickDetector
local Players = game.Players.LocalPlayer
Detector.MouseClick:Connect(function(Player)
local Cup = game.ReplicatedStorage.Cup:Clone()
Cup.Parent = Player.Backpack
print(Player)
if Cup.Parent == Player.Backpack then
end
end)
Not sure what to do with the if Cup.Parent thing so the Script knows the character can only have one.

1 comment
Oh wow! It works! Thank you so much!