I want to set a certain screengui in playergui to enabled if a value is true. I think the script should be working, but for some reason it isn’t. I’ve tried everything I could think of, but it still isn’t working. This is the section of the script:
if game.Workspace.CriminalAbility.Ability.Value == "Sprint" then
local Player = game.Players.LocalPlayer
ContextActionService:BindAction(ACTION_RUN, RunAbility, false, Enum.KeyCode.LeftShift)
Uses = 2
Player:WaitForChild("PlayerGui").CriminalGui:WaitForChild("RunGui").UsesGUI.Text = Uses
Player:WaitForChild("PlayerGui").CriminalGui:WaitForChild("RunGui").Enabled = true
end
The first part of the script works fine but for some reason it doesn’t enable the Gui for the player. Also, “CriminalGui” is a folder, not an actual screengui. The script outputs no errors.