Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Tool not welding to hand correctly?

Asked by
Ap_inity 112
7 years ago
Edited 7 years ago

So, i have a card, i don't need to explain what it does.. And when i equip the card, this happends: https://i.gyazo.com/4e56679ab1335bbd0de4e2feb8b23dfb.gif

This is my script to give the card:

local Tools = script:WaitForChild("Backpack")

local Func = {}



Options = {
    Admins = {"Player1", "ApinityYT"};
}



Func.Check = function(What, With)
    for i, v in pairs(With) do
        if v == What then
            return true
        end
    end
    return false
end

Func.CharAdd = function(Char)
    local Player = game.Players:GetPlayerFromCharacter(Char)    

    for i, tools in pairs(Tools:GetChildren()) do
        tools:Clone().Parent = Player.Backpack
    end
end

Func.PlayerAdd = function(Player)
    if Func.Check(Player.Name, Options.Admins) then
        Player.CharacterAdded:connect(Func.CharAdd)
    end
end


game.Players.PlayerAdded:connect(Func.PlayerAdd)

If you see anything wrong, either leave a comment or answer my question, thanks!

1 answer

Log in to vote
0
Answered by 7 years ago

Hello. I have seen the GIF animation, and what I suspect is that the Handle part of the tool is Anchored. If this is so, disable the Anchored property. This causes the tool to stay in a specific spot. This denies the player the ability to move. If the Anchored property is set to false, let me know and I'll try to answer your problem again. I hope this helped you and have fun scripting.

0
This solved my problem, thank you! Ap_inity 112 — 7y
Ad

Answer this question