I've read other stuff similar to my question, none really helped me though
local TS = game:GetService("TweenService")
local Plr = game:GetService("Players").LocalPlayer
local HRP = Plr.Character.HumanoidRootPart
if success() then
for _, v in pairs(workspace:GetChildren()) do
for _, c in pairs(v:GetChildren()) do
if c:IsA("Tool") then
TS:Create(HRP, TweenInfo.new(1), {CFrame = CFrame.new(c:FindFirstChild("Handle").CFrame)})
task.wait(0.5)
tween:Play()
end
end
end
end
I'm trying to make it so every time the success function is called, it tweens the player to the handle, it errors on line 9 which is, TS:Create(HRP, TweenInfo.new(1), {CFrame = CFrame.new(c:FindFirstChild("Handle").CFrame)}), I'm not doing teleportation because of the anti cheat detecting teleportation.

2 comments
Is this all the code?
Nope, don't want to show the source of the success() function but I don't think that's needed, the problem is on line 9 around the part where I get the handles CFrame.