Can someone help me with my script?
Please make your question title relevant to your question content. It should be a one-sentence summary in question form.
I was trying to make a skill script, but I wanted like when a player sets a text box as a key that when you press the key it would do the move. Can someone help me ?
This is the script if you need to see it.
02 | Player = script.Parent.Parent |
04 | mouse = Player:GetMouse() |
05 | run = game:GetService( "RunService" ) |
06 | function onKeyDown(key) |
07 | if not enabled then return end |
11 | RightShoulder = Player.Character.Torso [ "Right Shoulder" ] |
12 | LeftShoulder = Player.Character.Torso [ "Left Shoulder" ] |
13 | Run = game:GetService( "RunService" ) |
16 | LeftShoulder.C 0 = LeftShoulder.C 0 *CFrame.Angles( 0 , 0 , - 0.16 ) |
17 | RightShoulder.C 0 = RightShoulder.C 0 *CFrame.Angles( 0 , 0 , 0.16 ) |
18 | RightShoulder.C 0 = RightShoulder.C 0 *CFrame.Angles( 0 , 0.1 , 0 ) |
19 | LeftShoulder.C 0 = LeftShoulder.C 0 *CFrame.Angles( 0 , - 0.1 , 0 ) |
20 | Run.Stepped:wait( 0.01 ) |
23 | LeftShoulder.C 0 = LeftShoulder.C 0 *CFrame.Angles( 0 , 0.1 , 0 ) |
24 | RightShoulder.C 0 = RightShoulder.C 0 *CFrame.Angles( 0 , - 0.1 , 0 ) |
25 | LeftShoulder.C 0 = LeftShoulder.C 0 *CFrame.Angles( 0 , 0 , 0.16 ) |
26 | RightShoulder.C 0 = RightShoulder.C 0 *CFrame.Angles( 0 , 0 , - 0.16 ) |
27 | Run.Stepped:wait( 0.005 ) |
31 | LeftShoulder.C 0 = LeftShoulder.C 0 *CFrame.Angles( 0 , 0 , - 0.16 ) |
32 | RightShoulder.C 0 = RightShoulder.C 0 *CFrame.Angles( 0 , 0 , 0.16 ) |
33 | RightShoulder.C 0 = RightShoulder.C 0 *CFrame.Angles( 0 , 0.1 , 0 ) |
34 | LeftShoulder.C 0 = LeftShoulder.C 0 *CFrame.Angles( 0 , - 0.1 , 0 ) |
35 | Run.Stepped:wait( 0.005 ) |
37 | game:GetService( "Chat" ):Chat(Player.Character.Head, "Destructive Art HADO33!" ) |
38 | x = Instance.new( "Part" ) |
39 | x.BrickColor = BrickColor.new( "Bright red" ) |
40 | x.Size = Vector 3. new( 1 , 1 , 1 ) |
41 | x.TopSurface = "Smooth" |
42 | x.BottomSurface = "Smooth" |
47 | fd = script.Firedamage:clone() |
49 | y = Instance.new( "BodyVelocity" ) |
50 | y.maxForce = Vector 3. new( math.huge , math.huge , math.huge ) |
51 | y.velocity = Player.Character.Torso.CFrame.lookVector* 80 |
54 | f = Instance.new( "Fire" , x) |
57 | x.CFrame = Player.Character.Torso.CFrame*CFrame.new( 0 , 0 , - 12 ) |
59 | game.Debris:AddItem(x, 6 ) |
62 | LeftShoulder.C 0 = LeftShoulder.C 0 *CFrame.Angles( 0 , 0.1 , 0 ) |
63 | RightShoulder.C 0 = RightShoulder.C 0 *CFrame.Angles( 0 , - 0.1 , 0 ) |
64 | LeftShoulder.C 0 = LeftShoulder.C 0 *CFrame.Angles( 0 , 0 , 0.16 ) |
65 | RightShoulder.C 0 = RightShoulder.C 0 *CFrame.Angles( 0 , 0 , - 0.16 ) |
66 | Run.Stepped:wait( 0.01 ) |
73 | mouse.KeyDown:connect(onKeyDown) |