I am trying to round my numbers inside a function, but I am getting unexpected behavior. Sometimes the rounding simply never happens, while others it does. I tried adding a wait, and it still didn’t work.
( the 14.69999… is the line of code where I printed newModelSize.X )
( the 14.7 is the line of code I did the calculation outside the vector )
I am trying to round a vector3 so that my script can properly detect whether or not a vector3 is a devisor of another vector3, and in order to do this, I need perfectly rounded numbers.
As you can see from the images, the output incorrectly states the rounded number from the vector but not when I directly round it.
System information:
Windows 10 Home
10.0.19045 Build 19045
Intel(R) Core™ i5-10400 CPU, 2.90GHz, 2904 Mhz, 6 Cores, 12 Logical P…
Device Info
- User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 OPR/105.0.0.0
- Platform Type: PC
- Device Type: Computer
Beta Features Enabled:
AI-Powered Code Completion
Face Capture
Grass Length
Live Animation Creator
Material Generation
Multilayer Wrap Fix
Notification Overhaul
UIListLayout Flex Features
Updated Roblox Controls
Upgrade Shorelines
Video Uploads
Expected behavior
It should display a correctly rounded vector3 when I print.