I had that problem before too, you need to use magnitude like:
local Magnitude = (player.Character.HumanoidRootPart.Position - part.Position).Magnitude
If Magnitude < 5 then
Gui.Enabled = true
else
Gui.Enabled = false
end
And add this lines of code inside a loop or runservice to check if the player is near the part you want the gui to apear.
If you have any more problems with this please consider replying to me back!
When any player touches this, all the players will see it because there is no check what player it is. You also don’t check if the hit is an actual player!
local plr = game.Players.LocalPlayer
game.Workspace.Bankomat.Union.Touched:Connect(function(hit)
local hitPlr = game.Players:GetPlayerFromCharacter(hit.Parent)
if (hitPlr == nil) then return end
if (hitPlr ~= plr) then return end
RedeemFrame.Visible = true
plr.Character:FindFirstChildOfClass("Humanoid"):UnequipTools()
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
end)