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

Jetpack Welding Problems?

Asked by 9 years ago
function OnPlayerAdded(Player)
    Player.CharacterAdded:connect(function(Char)
        local Jetpack = game.ServerStorage["Jetpack Model"]:Clone()
        Jetpack.Parent = game.Workspace

        local Base = Char:findFirstChild("Torso")
        print("Torso found")
        local Part = Jetpack:findFirstChild("HumanoidRootPart")
        print("Base of Jetpack found")

        local Weld = Instance.new("Weld", Jetpack.t)
        print("Weld Instanced into Base of Jetpack")
        Weld.Part0 = Base
        print("Weld Part0 set")
        Weld.Part1 = Part
        print("Weld Part1 set")
    end)
end

game.Players.PlayerAdded:connect(OnPlayerAdded)

if #game.Players:GetPlayers() > 0 then
    OnPlayerAdded(game.Players:GetPlayers()[1])
end

Everything is being printed **fine, but the weld is not in **Jetpack.t

Thread on Scripters sub forum ^

0
I want to attach the Jetpack to the back of the Character's Torso. BosswalrusTheCoder 88 — 9y
0
HumanoidRootPart is a Part of the Jetpack. Its the Part I weld to the back of the Character. BosswalrusTheCoder 88 — 9y
0
Everything is welded together and unanchored. BosswalrusTheCoder 88 — 9y
View all comments (2 more)
0
Put the script in the Jetpack in Workspace BosswalrusTheCoder 88 — 9y
0
Fixed problem. BosswalrusTheCoder 88 — 9y

Answer this question