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

Why doesn't this LocalScript work? [Still unanswered]

Asked by
Marios2 360 Moderation Voter
10 years ago

I have tried everything to make this GUI function, but it never does. What exactly is the problem, really? Seems impossible to fix. (LocalScript updated, which still won't work)

local bootup = game.Players.LocalPlayer.PlayerGui.CyborgVision.PowerAndHealth.EmergencyReboot.BootUpLabel.Visible
local shutdown = game.Players.LocalPlayer.PlayerGui.CyborgVision.PowerAndHealth.EmergencyReboot.ShutDownLabel.Visible
local frame = game.Players.LocalPlayer.PlayerGui.CyborgVision.PowerAndHealth.EmergencyReboot.Visible

if game.Players.LocalPlayer.Character.Humanoid.Health <= 10 then
    mouse = game.Players.LocalPlayer:GetMouse()
    mouse.KeyDown:connect(function(key)
        if key:lower() == "z" then
        frame = 1
        game.Players.LocalPlayer.Character.Humanoid.AutoRotate = false
        game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0
        wait(2.5)
        shutdown = 0
        wait(4)
        bootup = 1
        wait(1.5)
        frame = 0
        shutdown = 1
        bootup = 0
        game.Players.LocalPlayer.Character.Humanoid.AutoRotate = true
        game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
        game.Players.LocalPlayer.Character.Humanoid.Health = 100
    end
    end)
    end

1 answer

Log in to vote
0
Answered by
acecateer 130
10 years ago

AutoRotate is a Boolean Value. See here

So it's true or false not 1 and 0.

Also for all the other one's: Frame, Bootup and shutdown.

Visible is also a Boolean Value

0
Helps, but did not solve it. Neither at my script nor Shawn's. Still helpfil, thanks for reminding. Marios2 360 — 10y
0
I couldn't see the end of lines 1-3 so I pasted it on notepad and noticed you did the same thing for changing Visible. acecateer 130 — 10y
0
oh, so all of these values are true or false? i am going to try it, and if you were right after all, you're approved and +! rep'd Marios2 360 — 10y
Ad

Answer this question