Sorry for bad english,
I have create a BindableEvent inside the Backpack, called "RefreshPetsEquipped"
I need close the PetsInvFrame when a player buy a gamepass.
In a LocalScript:
local RefreshPetsEquipped = player.Backpack:WaitForChild("RefreshPetsEquipped")
local function OnEquippedFrame()
PetsInvFrame.Visible = false
PetsFrame:ClearAllChildren()
EquippedFrame:ClearAllChildren()
end
RefreshPetsEquipped.Event:Connect(OnEquippedFrame)
Inside the Script i have add this when the purchase is correct:
local StarterPack = game:GetService("StarterPack")
local RefreshPetsFrame = StarterPack:WaitForChild("RefreshPetsEquipped")
---blablabla
print("Test")
RefreshPetsFrame:Fire()
I see the "Test" when i buy the Gamepass correctly, but the PetsInvFrame still visible. 100% sure i wrong with use the BindableEvent. Who can help me?
0 Errors in Output

2 comments
I have add (player) inside the function and change the Fire with FireClient(player), now work perfectly, ty
Ah yes, sorry I forgot to edit that part. Glad I could help.