Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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

3 comments

0

Helps, but did not solve it. Neither at my script nor Shawn's. Still helpfil, thanks for reminding.

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.

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

This discussion is preserved as it was. New answers, comments, and votes are closed.