Teleporting Glitch when Drinking Item

The drinks are the only problem. For some reason when I equip or drink it, it teleports me to my little spot behind the drinks for some reason.

Video: - YouTube

Does anyone know why it happens with the drinks and teleports me to the same little spot?

If you need to ask for my scripts please ask below.

Thanks.

Unanchored the object when it is taken.

Uhh it dosen’t work when I click on it, uh oh- image

Because you selected the tool, not the handle

The object when it is taken is anchored and this bug occurs because of this, unanchored it when it is taken

Tool.Handle.Anchored = false

Its anchored so the player is stuck because their holding an anchored object, put this script in the tool:

local Handle = script.Parent:WaitForChild("Handle")

local Tool == script.Parent

if Tool.Activated = true then
   Handle.Anchored = false
end

No, it’s because he selected the tool so the anchor thing didn’t recognize it as part, it’s no bug

So he should select the handle.

1 Like

I know, the only thing I am saying is that in the script he must change the Anchored state, if he unanchored it in studio it would fall.

I don’t think it would, whenever I unanchor it never falls until I click play.

image
It works but for some reason only 1 remains idk why.

I think @SOTR654 is right, try the script

There is an error image

Send the script that gives the object, please, to add this change.

ClickDetector script:

local tool = script.Parent.Parent

local click = script.Parent.ClickDetector

local function pickup(player)

tool.Parent = game.Workspace[player.Name]

end

click.MouseClick:Connect(pickup)

With my Chips it works but the drinks when I used geometrical’s advice it worked with the drinks but only 1 drink appeared for some reason.

What you want is to clone, right?

local tool = script.Parent.Parent
local click = script.Parent.ClickDetector

local function pickup(player)
	local Clone = tool:Clone()
	Clone.Handle.Anchored = false
	Clone.Parent = player.Character
end
click.MouseClick:Connect(pickup)

you can re-anchor the tool handle if you want.

1 Like

Yes! But the script in the handle or tool?

It’s the same one you gave, just replace that fragment with mine.

Thank you so much!
Really helped and very appreciated.

Have a good day!

–Thanks to everyone that helped too–

1 Like