So I am creating an Egg Hunt games where you collect the eggs you get a launcher.
The only thing is that I want it to check if the player has the tool already.
I tried player.Backpack:FindFirstChild("DevLauncher") with Not and without it but it still didn't work. Here are the results:
Not: It worked but the only thing is that I could keep collecting the launcher over and over again.
Without Not: I couldn't collect the egg at all.
Here is the script:
local enabled = true
game.Players.PlayerAdded:Connect(function(p)
local part = game.Workspace.Eggs:WaitForChild("Creator Egg")
local Tool = p.Backpack:FindFirstChild("InfluencerLauncher")
part.Touched:Connect(function()
if enabled == true then
if p.Backpack:FindFirstChild("InfluencerLauncher") then
local Launcher = game.ServerStorage.InfluencerLauncher:Clone()
Launcher.Parent = p.Backpack
enabled = false
script.Parent.Transparency = 1
script.Parent.CanCollide = false
wait(30)
enabled = true
script.Parent.Transparency = 0
script.Parent.CanCollide = true
end
end
end)
end)
Any help would be greatly appreciated!
