So I was trying to get this permadeath system to work but when I said ":PD ON" it kept giving me an error in game
--:PD ON Is not a valid EnumItem
Stack Begin
Script Players.enacent00.PlayerGui.PDUI.Toggle , Line 9
Stack End
This is the code in the script
local GroupID = 4327198
local MinRank = 230
local Player = game.Players.LocalPlayer
local UIS = game:GetService("UserInputService")
local Bind = ":PD ON"
UIS.InputBegan:Connect(function(K,T)
if K.KeyCode == Enum.KeyCode[Bind] and not T then
if Player:GetRankInGroup(GroupID) >= MinRank or Player.Name == "YnwRash" or Player.Name == "enacent00"then
if script.Parent.Enabled == true then
script.Parent.Enabled = false
elseif script.Parent.Enabled == false then
script.Parent.Enabled = true
end
end
end
end)

9 comments
What do you want the script to do http:/xyproblem.info
Its supposed to toggle the PDUI on and off
how is it supposed to toggle
https://idownvotedbecau.se/unclear
Line 13 to 16
The Main Issue is line 9 because the KeyCode Binded doesn't work
how is it supposed to toggle
By me saying :PD ON
in the chat?