Photo: https://imgur.com/a/1oxMd0j

Basically, I want to make, only the one Billboard GUI, that will be shown at a time, The player when Click E, can interact with it.

Script:

--tools
local bagTool1 = game.ReplicatedStorage.BagWeaponFold.BagTool
local bagToolClone = bagTool1:Clone()
    

local player = game.Players.LocalPlayer
local HumanoidRootPart = game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart")
local UIS = game:GetService("UserInputService")
local FrontBottomLeft = game.Workspace.Cashes.Left.FrontBottomLeft.Union

UIS.InputBegan:Connect(function(key)
	if key.KeyCode == Enum.KeyCode.E then
		if (FrontBottomLeft.Position - HumanoidRootPart.Position).magnitude < 5 then
			game.Workspace.Cashes.Left.FrontBottomLeft:Destroy()
			bagToolClone.Parent = player.Backpack
		end
	end
end)

2 comments

0

Maybe try max distance?

0

Yes but, my parts are close to each other, so that won't help