local variable = false
local p = game.Players.LocalPlayer
function toggle()
if variable == false then
variable = true
print(variable)
else
variable = false
print(variable)
end
end
game:GetService("ContextActionService"):BindActionToInputTypes("Toggle", toggle, true, "q") --The Q part sets the key q to do the same thing as the mobile button does. Change this to your liking.
p.PlayerGui.ContextActionGui.ContextButtonFrame.ContextActionButton.Position = Vector3.new(0, 0, 0, 0)
It prints out an error saying :
00:30:30.620 - ContextActionGui is not a valid member of PlayerGui
00:30:30.621 - Stack Begin
00:30:30.621 - Script 'Players.YBN_oSy.PlayerScripts.LocalScript', Line 16
00:30:30.622 - Stack End
If anybody knows a solution, please let me know

1 comment
Thanks:)