This item is not replicated across Roblox’s server/client boundary.
This property can only be read from. Attempting to write to it will cause an error.
The UnitRay property is a
DataType/Ray directed toward the
Mouse's position in 3D space (described by
Mouse/Hit). It originates from the
Camera/CFrame|CFrame of the
Workspace/CurrentCamera. Like all unit rays, it has a distance of 1.
local Players = game:GetService("Players") local player = Players.LocalPlayer local mouse = player:GetMouse() print(mouse.UnitRay.Direction.magnitude) -- Always 1