Is there a way I can activate a surface gui if the player that equips the gear have a Surface gui pop up. Thanks so much from John.
This should be pretty simple. All you have to do is detect when the backpack gets an additional item, if it is the correct item, the Surface GUI pops up.
Here is a quick snippet (cannot test atm):
local Backpack = game.Players.LocalPlayer.Backpack
local SurfaceGui = workspace.part.surfacegui -- Location of SurfaceGui
Backpack.ChildAdded:Connect(function(child)
if child.Name == "NameOfGear" then
SurfaceGui.Enabled = true
end
end)
Backpack.ChildRemoved:Connect(function(child)
if child.Name == "NameOfGear" then
SurfaceGui.Enabled = false
end
end)
3 Likes