Is there a way to make my script more efficient by comparing the three values more directly or is this the best it can be? Here is my script:
local plr = game:GetService("Players").LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local fire = workspace.Heat
local warmDist = 24
local hotDist = 12
local burnDist = 4
while true do
wait(1)
local distance = (char.HumanoidRootPart.Position - fire.Position).magnitude
if distance <= warmDist then
print("It's warm")
end
if distance <= hotDist then
print("It's hot")
end
if distance <= burnDist then
print("It's BURNING HOT")
end
end
