local Text = script.Parent
local MainGui = script.Parent.Parent
local EnterButton = MainGui.TextButton
local TextPrompt = MainGui.TextLabel
Text.PlaceholderText = “Create a Password”
EnterButton.Text = “Create!”
local PasswordDoor = game.Workspace:WaitForChild(“Model”)
local IsEntered = false
local DISTANCE_TO_DOOR = 10
local Character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
local function isCloseEnoughToDoor(player, door)
–//Assign some random part in the door to be the PrimaryPart of the model
return (player.PrimaryPart.Position - door.Part.Position).Magnitude <= DISTANCE_TO_DOOR
end
if isCloseEnoughToDoor(Character, workspace.Model.Part) then
print(“HI”)
end