Hi everyone, I’m currently working on an Ability Tool System rn and if I activate my Tool it teleports me but I can like spam it without it having a cooldown and it teleports me throw the walls here’s the script
--LocalScript parented to the tool
local player:Player = game:GetService("Players").LocalPlayer
local character:Model = player.Character or player.CharacterAdded:Wait()
local rootPart:Part = character:WaitForChild("HumanoidRootPart")
local tool:Tool = script.Parent
local function onToolActivated()
rootPart.CFrame += rootPart.CFrame.LookVector * 100
end
tool.Activated:Connect(onToolActivated)