I want to make a part appear at my right arm when I press the key B and to remove it when I press B again.I tried some ways to remove the part but it didn't work.It didn't say anything in the output.Basically all I want to know is how to make an event after another one started.Here's the code for making the part:
Player = script.Parent.Parent
c = Player.Character
mouse = Player:GetMouse()
activate = false
function onMouseButton1Down(Key)
activate = true
key = Key:lower()
if key == "b" then
c["Right Arm"].Transparency = 1
x = Instance.new("Part")
x.TopSurface = "Smooth"
x.BottomSurface = "Smooth"
x.Size = c["Right Arm"].Size
x.BrickColor = BrickColor.new("Black")
x.Transparency = 0
x.Reflectance = 0.1
x.Parent = c
w1 = Instance.new("Weld", c)
w1.Part0 = w1.Parent["Right Arm"]
w1.Part1 = x
w1.C1 = CFrame.fromEulerAnglesXYZ(0, 0, 0) *CFrame.new(0, 0, 0)
end
end
mouse.KeyDown:connect(onMouseButton1Down)

4 comments
Yeah, I'd like to see how.
There. Check that out, and reply if you have further questions.
Thanks!
No problem.