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)
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.
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)
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?