I Used The Tag Plugin And I Need Help
--// Services
local Workspace = game:GetService("Workspace")
local CollectionService = game:GetService("CollectionService")
local TaggedParts = CollectionService:GetTags("Portal")
--// Objects
local Portal = game.Workspace.Builds.Portals:WaitForChild("Portal")
local PortalCost = Portal:WaitForChild("Cost")
local TouchPortal = game.Workspace.Builds.Portals.Portal.PortalDoor
for _, TaggedParts in pairs(TaggedParts) do
TaggedParts.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
print(PortalCost.Value)
end
end)
end