my code:
local EggSplat = game.Workspace.EggSplat
local ProximityPrompt = script.Parent
local Player = game:GetService("Players").LocalPlayer
EggSplat.Transparency = 1
ProximityPrompt.Triggered:Connect(function()
if Player.Backpack:FindFirstChild("Egg") then
EggSplat.Transparency = 0
end
end)
egg script:
> local ProximityPrompt = script.Parent.ProximityPrompt
>
> ProximityPrompt.Triggered:Connect(function()
> ProximityPrompt:Destroy()
>
> end)
what I am trying to do is that if the egg is picked up, the inventory will detect that if the egg is in there, then the script will make the eggsplat visible. But this doesn’t seem to be working