#Why does the tool teleport me at all when I equip it?

25 messages · Page 1 of 1 (latest)

topaz apex
#

I've found a big part of the problem: For some reason, when I equip the tool ONLY after clicking on it, it teleports me to the tool situated in the REPLICATED STORAGE. It doesn't do this when I equip it after touching it, though
I have no clue what is causing this, it doesn't do that at all with other items

local Tool = script.Parent
local cd = Tool.Handle.ClickDetector
local enabled = true

cd.MouseClick:Connect(function(Player)
    local Toolclone = game.ReplicatedStorage.Apple:Clone()
    Toolclone.Parent = Player.Backpack
    Tool:Destroy()
end)

function onActivated()
    if not enabled then
        return
    end

    enabled = false

    local player = game.Players:GetPlayerFromCharacter(Tool.Parent)
    if player then
        local humanoid = player.Character and player.Character:FindFirstChild("Humanoid")
        if humanoid then
            humanoid.WalkSpeed = humanoid.WalkSpeed + 5
        end
    end

    Tool.Handle.Eating:Play()

    wait(0.8)


    Tool:Destroy()
end

local Players = game:GetService("Players")

function onEquipped()
    Tool.Handle.OpenSound:Play()
end


script.Parent.Activated:Connect(onActivated)
script.Parent.Equipped:Connect(onEquipped)

Updated script

#

Why does the tool teleport me at all when I equip it?

cedar orbit
#

because its anchroed

#

acnhri

#

acnoir

#

anchoire

#

acnhored

#

amchored

topaz apex
#

I swear

cedar orbit
#

anchroed

topaz apex
#

If that's the issue

cedar orbit
#

bro

#

anchord

topaz apex
#

Anchored

cedar orbit
#

how tf do you say it

#

yeah

river parcel
#

Yea it's prolly because it's anchored

topaz apex
#

Let me see

river parcel
#

If un anchoring won't work then try welding them

topaz apex
#

I had literally been trying to solve that for years....

cedar orbit
#

years..

topaz apex
#

And yet the solution was so absolutely dumb

#

Holy crap

#

Thank you

#

💀