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

Why won't the part weld?

Asked by
neoG457 315 Moderation Voter
8 years ago
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()

enabled = true
Mouse.KeyDown:connect(function(key)
if not enabled then
        return
    end
if key == "z" then
enabled = false

local Oxygen = Instance.new("Part")

    Oxygen.Shape = "Ball"
    Oxygen.Transparency = 0.5
    Oxygen.Size = Vector3.new(1, 1, 1)
    Oxygen.BrickColor = BrickColor.new("White")
    Oxygen.Anchored = false
    Oxygen.CanCollide = false

local w = Instance.new("Weld")
w.Part0 = Oxygen
w.Part1 = Player.Character["Right Arm"]
w.Parent = Oxygen   
w.C0 = CFrame.new(0, -1 ,0)*CFrame.Angles(0 ,0 ,0)       

Oxygen.Parent = workspace

for i = 1, 10 do    

Oxygen.Size = Oxygen.Size + Vector3.new(0.5, 0.5, 0.5) 

wait(0.1)

end

if Oxygen.Size == Vector3.new(5, 5, 5) then

Oxygen:Destroy()
end


Mouse.KeyUp:connect(function(key)
if key == "z" then

Oxygen:Destroy()


wait(3)
enabled = true  

end
    end)
end
    end)

It doesnt weld the part to my right arm.

0
Swap Part0 and Part1 around. Lacryma 548 — 8y

Answer this question