Yep ^^
Just have to make the reposition of the tool, since it’s spawner a kilometer in front of the player and it might be a source of glitch
Try what I did maybe?
t.CFrame = player.Character.HumanoidRootPart.CFrame.LookVector * -5
Put this line before parenting to workspace so it changes the CFrame and then parents it to worksapce
Completly broke the script lmao
Did you forget to add a 5 or did you quote me wrong? What’s the code right now?
Here it is :
game.ReplicatedStorage.DropEvent.OnServerEvent:Connect(function(player, tool)
local char = player.Character
local t = char:FindFirstChildWhichIsA("Tool")
local humanoid = char:FindFirstChild("Humanoid")
print(t, humanoid)
humanoid:UnequipTools()
if t then
t.CFrame = player.Character.HumanoidRootPart.CFrame.LookVector * - 5
t.Parent = workspace
tool.Position = player.Character.HumanoidRootPart.Position
elseif tool then
t.CFrame = player.Character.HumanoidRootPart.CFrame.LookVector * - 5
tool.Parent = workspace
tool.Position = player.Character.HumanoidRootPart.Position
end
end)
Btw now when the player drop the unequipped tool, it doesn’t drop it correctly
Remove those lines and change
t.CFrame = player.Character.HumanoidRootPart.CFrame.LookVector * - 5
in the elseif tool then
condition to
tool.CFrame = player.Character.HumanoidRootPart.CFrame.LookVector * - 5