|
| 13 Jun 2017 05:56 AM |
| So here's the code: local Player = game.Players.LocalPlayer local cam = workspace.CurrentCamera local Mouse = Player:GetMouse() while wait() do NewV = cam.CFrame.p ####### # ################################################### Dist = DistRay:Distance(Mouse.Hit.p) if Dist < 1000 then script.Parent.HUD.DistanceDisplay.Text = ""..("%.2f"):format(Dist).." Studs" else script.Parent.HUD.DistanceDisplay.Text = "1000+ Studs" end end Problem I'm having is that, instead of refreshing the point in where the camera is, I get the distance from the middle of the map. Is this me being a dolt? Any help would be appreciated, thanks! Also, if anyone can help in making the mouse less sensitive in First Person too, that'd be grand! |
|
|
| Report Abuse |
|
|
|
| 13 Jun 2017 05:57 AM |
| ...ROBLOX...Why... Dist ### # ### new(Vector3 new(NewV) ,Vector3 new(Mouse Hit p)) Unformatted for filter convenience. |
|
|
| Report Abuse |
|
|
|
| 13 Jun 2017 05:58 AM |
Ray equals Ray.
Is what that darn filter is blocking. |
|
|
| Report Abuse |
|
|
|
| 13 Jun 2017 05:59 AM |
local Player = game.Players.LocalPlayer local cam = workspace.CurrentCamera local Mouse = Player:GetMouse()
while wait() do NewV = cam.CFrame.p Dist Ray equals Ray new(Vector3 new(NewV),Vector3 new(Mouse Hit p)) Dist = DistRay:Distance(Mouse.Hit.p) if Dist < 1000 then script.Parent.HUD.DistanceDisplay.Text = ""..("%.2f"):format(Dist).." Studs" else script.Parent.HUD.DistanceDisplay.Text = "1000+ Studs" end end
Fixed version. |
|
|
| Report Abuse |
|
|