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

Can someone help me with my script?

Asked by
red106 0
11 years ago

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.

01local enabled = true
02Player = script.Parent.Parent
03--Player:WaitForDataReady()
04mouse = Player:GetMouse()
05run = game:GetService("RunService")
06function onKeyDown(key)
07if not enabled then return end
08enabled = false
09    Key = key:lower()
10    if key == "z" then
11        RightShoulder = Player.Character.Torso["Right Shoulder"]
12        LeftShoulder = Player.Character.Torso["Left Shoulder"]
13        Run = game:GetService("RunService")
14        for i = 1, 2 do
15            for i = 1, 12 do
View all 73 lines...
0
I'm not going to bother to answer if you don't put exactly what you need. Saying you want a textbox means nothing. c0des 207 — 11y
0
No I was going to put the text box in a frame and the when a player puts the text box as a key the script would activate. red106 0 — 11y
0
Here is the problem, posting 73 lines of code and then expecting us to do something with an unclear description of what you want is like walking into a room of preschoolers and telling them that they need to do Calc. Vathriel 510 — 11y

1 answer

Log in to vote
0
Answered by 11 years ago

First of all what key do you want to be pressed to do the move

01local enabled = true
02Player = script.Parent.Parent
03--Player:WaitForDataReady()
04mouse = Player:GetMouse()
05run = game:GetService("RunService")
06function onKeyDown(KEY)-------- replace KEY with the key you want pressed
07if not enabled then return end
08enabled = false
09    Key = key:lower()
10    if key == "z" then
11        RightShoulder = Player.Character.Torso["Right Shoulder"]
12        LeftShoulder = Player.Character.Torso["Left Shoulder"]
13        Run = game:GetService("RunService")
14        for i = 1, 2 do
15            for i = 1, 12 do
View all 73 lines...
0
I want them to be able to put there own key in a text box, and then when they press that key it does the move. red106 0 — 11y
Ad

Answer this question