I made this script to make a intereact gui pop up when i walk near a door
local RunService = game:GetService("RunService")
local Character = game.Players.LocalPlayer.Character
local Door = workspace.Door
RunService.RenderStepped:Connect(function()
local DoorFromPlayer = (Character.Head.Position - Door.Open.Position).Unit
if DoorFromPlayer > .25 then
print(Character.Name .. " is near the door")
else
print(Character.Name .. " is not near the door")
end
end)
But it gives this error
15:51:12.919 - Workspace.NathantheCraziest.DoorOpenScript:8: attempt to compare number and userdata

1 comment
You are actually wrong