I’m making a teleport move, and I want there to be a max range on the teleport.
The script basically just checks if the mouse if hovering over a player and if it is it’ll teleport you to them
Problem is you’d be able to teleport anywhere and I’d prefer it to have a range of say 150 studs or so.
local target = mouse.Target
--Add an if checking if target is within range (pls explain how it works)
if target.Parent:FindFirstChild("Humanoid") then
RCD = true
script.Pika.R:FireServer(target)
wait(6)
RCD = false
end