i have been having problems with this code. I want to make it stop an movement of the player when that frame is visible. I tried the script below but if didn't work (i took the movement control script from roblox's devforum). PLease help, thnx ps: I am new so i am bad at scripting
local UIP = game:GetService("UserInputService")
if game.StarterGui.ScreenGui2.Frame.Visible == true then
if UIP.UserInputType == Enum.UserInputType.Keyboard then
if UIP.KeyCode == Enum.KeyCode.W and Enum.KeyCode.A and Enum.KeyCode.S and Enum.KeyCode.D then
local controls = require(game:GetService("Players").LocalPlayer.PlayerScripts.PlayerModule):GetControls()
controls:Disable()
end
end
end

2 comments
ok but can u give the script?
It is not a request website, you have to write it yourself or give us a code to fix.