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

Ok for Script Builder My Welding and crap works but when i hit z it dosent work?

Asked by 10 years ago
local Player = game.Players.LocalPlayer
c = Player.Character
mouse = Player:GetMouse()
game.Workspace.DeckOfKings.Animate:Remove()
a = Instance.new("Part")
a.Size = Vector3.new(2, 2.3, 1.6)
a.Anchored = false
a.CanCollide = false
a.TopSurface = "Smooth"
a.BottomSurface = "Smooth"
a.Parent = c
a.BrickColor = BrickColor.new("Black")
w1 = Instance.new("Weld",c)
w1.Part0 = w1.Parent["Left Leg"]
w1.Part1 = a
w1.C0 = CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(0,0,0)
wait()
x = Instance.new("Part")
x.Size = Vector3.new(2, 2.3, 1.6)
x.Anchored = false
x.CanCollide = false
x.TopSurface = "Smooth"
x.BottomSurface = "Smooth"
x.Parent = c
x.BrickColor = BrickColor.new("Black")
w2 = Instance.new("Weld",c)
w2.Part0 = w2.Parent["Right Leg"]
w2.Part1 = x
w2.C0 = CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(0,0,0)
wait()
m = Instance.new("Part")
m.Size = Vector3.new(1.8, 2.3, 1.6)
m.Anchored = false
m.CanCollide = false
m.TopSurface = "Smooth"
m.BottomSurface = "Smooth"
m.Parent = c
m.BrickColor = BrickColor.new("Black")
w3 = Instance.new("Weld",c)
w3.Part0 = w3.Parent.Torso
w3.Part1 = m
w3.C0 = CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(0,0,0)
wait()
--
g = Instance.new("Part")
g.Size = Vector3.new(1.8, 2.3, 1.6)
g.Anchored = false
g.CanCollide = false
g.TopSurface = "Smooth"
g.BottomSurface = "Smooth"
g.Parent = c
g.BrickColor = BrickColor.new("Black")
w4 = Instance.new("Weld",c)
w4.Part0 = w4.Parent["Right Arm"]
w4.Part1 = g
w4.C0 = CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(0,0,0)
wait()
t = Instance.new("Part")
t.Size = Vector3.new(1.8, 2.3, 1.6)
t.Anchored = false
t.CanCollide = false
t.TopSurface = "Smooth"
t.BottomSurface = "Smooth"
t.Parent = c
t.BrickColor = BrickColor.new("Black")
w5 = Instance.new("Weld",c)
w5.Part0 = w5.Parent["Left Arm"]
w5.Part1 = t
w5.C0 = CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(0,0,0)
wait()
gg = Instance.new("Part")
gg.Size = Vector3.new(2, 2.8, 0.2)
gg.Anchored = false
gg.CanCollide = false
gg.TopSurface = "Smooth"
gg.BottomSurface = "Smooth"
gg.Parent = c
gg.BrickColor = BrickColor.new("Black")
w6 = Instance.new("Weld",c)
w6.Part0 = w6.Parent.Head
w6.Part1 = gg
w6.C0 = CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(-0,0,1)
function me()
        Key = key:lower()
        if key == "z" then
                lahfa = Instance.new("Part")
                lahfa.BrickColor = BrickColor.new('Black')
                lahfa.Size = Vector3.new(1,1,1)
                lahfa.TopSurface = "Smooth"
                lahfa.BottomSurface = "Smooth"
                lahfa.Shape = "Ball"
                y = Instance.new("BodyVelocity",lahfa)
                y.maxForce = Vector3.new(math.huge,math.huge,math.huge)
                y.velocity = Player.Torso.CFrame.lookVector*80
                lahfa.Parent = Workspace
                lahfa.CFrame = Player.Torso.CFrame*CFrame.new(0,0,-4) 
                lahfa.Touched:connect(onTouch)
                wait(3)
                lahfa:remove()
end
end
function onTouch(part)
local human = part.Parent:FindFirstChild("Humanoid",true) 
if human~=nil and  human.Parent~=Player and hit.Parent.Name ~= "DeckOfKings" then
human:TakeDamage(100)
end
end 
mouse.KeyDown:connect(me)

1 answer

Log in to vote
0
Answered by
MrFlimsy 345 Moderation Voter
10 years ago

Get rid of "Key = key:lower()" on line 84, and put "key" in between the brackets on line 83 (without the quotes). Then it should work.

Ad

Answer this question