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

how to make this local script work properly ? [closed]

Asked by 10 years ago

its onkey run gui when you press the key "r" its suppose to make you run and the gui bar goes down when keyup it stops going down and recharges to max

01Player = script.Parent.Parent.Parent
02mouse = Player:GetMouse()
03local active = script.Parent.active.Value
04local run = script.Parent.run.Value
05run = 1
06   active = false
07function onKeyDown(key)
08    key = key:lower()
09    if key == "r" then
10        active = true
11        if active == true then
12for i = 0,1,0.005 do
13    wait()
14    script.Parent.Frame.ImageLabel.Size = UDim2.new(run -i , 0, 1, 0)
15    Player.Character.Humanoid.WalkSpeed = 27
View all 37 lines...
0
I suggest you look into proper code formatting and fix that up, it's difficult to read. Are you getting any errors, is the code running *at all*? Where is this LocalScript located? adark 5487 — 10y
0
its in a gui and it does work but it doesnt stop and keyup it goes past the max Layfonex 0 — 10y
0
You're going to have to tell us what the issue you are having is before we can help. FearMeIAmLag 1161 — 10y
0
I understand the issue, but I don't understand the intent of this code. @OP; what do each of the Values mean? adark 5487 — 10y

Closed as Not Constructive by FearMeIAmLag, EzraNehemiah_TF2, and BlueTaslem

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?