So my script that destroy's a gui for mobile users isn't doing what its meant to do
local UserInputService = game:GetService("UserInputService") if (UserInputService.KeyboardEnabled) then script.Parent.Parent.Parent.MobilGui:Destroy() end
For first, you can put UserInputService.KeyboardEnabled == true
is better. and put the scripts with child of GUI
and use this: script.Parent:Destroy()
In my point of view, your script is perfect just need to do these things
Here is the script:
local UserInputService = game:GetService("UserInputService") wait() if UserInputService.KeyboardEnabled == true then script.Parent.MobilGui:Destroy() end
Hope it helped! :) Errors? tell-me on comments.