Friends script doesnt work

So my friends script doesn’t work for some reason. He said there’s no errors, and his tool won’t activate. He used prints but it didn’t work.

Here’s his tool and his script:

local part = game.Workspace.Part100
local partclone = part:Clone()
local player = game.Players.LocalPlayer
player.CharacterAdded:Wait()
local character = script.Parent.Parent
local hrp = character.HumanoidRootPart
partclone.Parent = workspace

script.Parent.Activated:Connect(function()
    partclone.CFrame = hrp.CFrame * CFrame.new(5,5,5)
end)

unknown

He doesn’t know how to fix it and he already asked a lot of people. He tried to restart studio but I don’t think it worked.

Anything helps.

1st. Does “Part100” Really Exist
2nd. remove “player.CharacterAdded:Wait()” It is not needed

Tell me if you’ve done those and ensured this all works

1 Like

We tried that, yea part100 exists. Anything else that could be wrong?

Did you the second thing, if yes notify me!

1 Like

I did! We didn’t find anything else.

Hmm let me make a script for you tell me if it works

local part = workspace:FindFirstChild("Part100")
if not part then warn("Error: Part100 does not exist") end

local player = game.Players.LocalPlayer
local character = player:FindFirstChild("Character")
local hrp = character:FindFirstChild("HumanoidRootPart")

if not character then warn("Error: Character does not exist") end
if not hrp then warn("Error: HumanoidRootPart does not exist") end

if not script.Parent:IsA("Tool") then warn("Error: This has to be a tool") end

local newPart = part:Clone()
if not newPart then warn("Error: Cloned part got deleted on clone")

script.Parent.Activated:Connect(function()
    newPart.CFrame = hrp.CFrame * CFrame.new(5,5,5)
end)
1 Like

Notify me if it works / or not and if it gives any errors @squaredsnow

script.Parent.Parent of a script inside a tool is Backpack, you should set character to be player.Character, not sure how he wasn’t getting errors, maybe errors are disabled in the output?

1 Like

He still handn’t reply with my code thoe i added a bunch of debugs lol

He isnt responding lol… Sorry about that.

Oh, I added a bunch of debugs & checks so if there is remotely one error it should say it.

@squaredsnow any responses? kind of wierd he didn’t respond yet.

(gtg)

1 Like

Nah… I will just talk to him to just have me rewrite it.

1 Like