Basically, I found a script from a question about "Teleporting to the cursor when you press" that fitted what I was making. Heres what i copied.
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
local UserInputService = game:GetService("UserInputService")
local Mouse = Player:GetMouse()
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == Enum.KeyCode.V and Mouse.Hit then
local MouseCFrame = Mouse.Hit
HumanoidRootPart.CFrame = MouseCFrame
end
end)
I put it in StarterPlayerScripts. I'm just wondering if there is a way to put a cooldown and/or specific range to this teleportation script?

2 comments
Do you need cool down OR range, or both of them? I could do the cooldown part. But not sure about the range.
i need both. but you can give the cooldown to me if you want, because i need both