Expected result: Check if the player is looking at a certain part every 0.1 second, if yes, print BRUH MOMENT, else print NOT A BRUH MOMENT
Actual Result: it only checks the first frame for if its within bounds
it checks the first frame, sees the part isnt on-screen (its behind the player) spams NOT A BRUH MOMENT
(theres no errors)
Code:
local Camera = workspace.Camera
local part = game.Workspace.statue
local _, withinScreenBounds = Camera:WorldToScreenPoint(part.Position)
while true do
wait(0.1) --crappy solution aaa
if withinScreenBounds then
print("BRUH")
else
print("NOT A BRUH MOMENT")
end
end

1 comment
Works flawlessly, thanks!