GUI not becoming visible

So I’m trying to make a keybind when you click “U” it will summon a mode that makes your screen go a transparent red, the keybind script is in a local script that fires a remove event to the server although the frame to become visible is in the local script because I want only one person to see and it works it says the frame is visible when I check the property yet i cant see it, I tried using transparency and the script does itself but I still cant see the frame D:

1 Like

A script would be handy to see :thinking:

2 Likes

sorry for late response but here:
local plr = game.Players.LocalPlayer --gets the player from the playerlist
local char = plr.Character --gets the character
local hum = char:WaitForChild(“Humanoid”) --gets the humanoid
local animation = hum:LoadAnimation(script:WaitForChild(“Animation”))
local mouse = plr:GetMouse()
local uis = game:GetService(“UserInputService”)
local animation = hum:LoadAnimation(script:WaitForChild(“Animation”))

local debounce = true

uis.InputBegan:Connect(function(key,gep)
if gep then return end
if key.KeyCode == Enum.KeyCode.U and debounce then
debounce = false
game.StarterGui.SharinganGUI.Shar.Visible = true
wait(1)
script.SharinganActivate:FireServer()
wait(4)
debounce = true
end
end)

1 Like

Appreciate it :slightly_smiling_face:

It seems like you’re dealing with a simple issue, you’re actually referencing the StarterGui and not your own PlayerGui (If you actually look on your Explorer, both the StarterGui/PlayerGui are 2 different things)

This should fix it, also went ahead & revamped a bit of your code:

local plr = game.Players.LocalPlayer --gets the player from the playerlist
local PlayerGui = plr:WaitForChild("PlayerGui")
local char = plr.Character or plr.CharacterAdded:Wait() --gets the character
local hum = char:WaitForChild("Humanoid") --gets the humanoid
local animation = hum:LoadAnimation(script:WaitForChild("Animation"))
local mouse = plr:GetMouse()
local uis = game:GetService("UserInputService")
--local animation = hum:LoadAnimation(script:WaitForChild(“Animation”)) --Why did you reference this twice? Lol

local debounce = true

uis.InputBegan:Connect(function(key,gep)
    if gep or not debounce then return end

    if key.KeyCode == Enum.KeyCode.U then
        debounce = false
        PlayerGui.SharinganGUI.Shar.Visible = true
        wait(1)
        script.SharinganActivate:FireServer()
        wait(4)
        debounce = true
    end
end)
2 Likes

Wow that worked perfectly thank you so much! :smiley: