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

Another localscript broken?

Asked by 10 years ago

There's no error.

--TetherBLOX

one = script.Parent.Part1
two = script.Parent.Part2
three = script.Parent.Part3


one.Visible = true
ew = false
go = true

function new()
    mouse = game.Players.LocalPlayer:GetMouse()
    mouse.KeyDown:connect(function(keyPressed)
        if keyPressed == 'f' and go then
            go = false
            one.Visible = false
            two.Visible = true
            wait(1)
            ew = true
            if ew == true then
                two.Visible = false
                three.Visible = true
                wait(3)
                three.Visible = false
            end
        end
    end)
end
game.Players.PlayerAdded:connect(new)
0
Run it in game, Then click on F9 for the Local Script Console bbissell 346 — 10y
0
Where is the Local Scipt Located in the game? bbissell 346 — 10y
0
in ScreenGui>Frame RedneckBane 100 — 10y
0
Are the 3 values defined at the top parts or GUI elements? hudzell 238 — 10y
0
GUI elements RedneckBane 100 — 10y

2 answers

Log in to vote
0
Answered by
Gamenew09 180
10 years ago

If you are using a localscript you don't need to wait for a player to be added, the player is already added.

--TetherBLOX

one = script.Parent.Part1
two = script.Parent.Part2
three = script.Parent.Part3


one.Visible = true
ew = false
go = true

mouse = game.Players.LocalPlayer:GetMouse()
mouse.KeyDown:connect(function(keyPressed)
   if keyPressed == 'f' and go then
        go = false
        one.Visible = false
        two.Visible = true
        wait(1)
        ew = true
        if ew == true then
            two.Visible = false
            three.Visible = true
            wait(3)
            three.Visible = false
        end
    end
end)

Ad
Log in to vote
-1
Answered by 10 years ago

The thing is, the mouse.KeyDown isn't registering.

Answer this question