✓ Accepted answer
Note: StarterGui waits until a player joins, clones all of its contents, and moves all the cloned
UI objects to the PlayerGui in the player object(This applies to all players in the server).
Insert a LocalScript into StarterPlayerScripts located in StarterPlayer.
In the script, write the following code:
local UserInputService = game:GetService("UserInputService")
local playerGui = game.Players.LocalPlayer.PlayerGui
local imageLabel = playerGui:WaitForChild("ScreenGui"):WaitForChild("ImageLabel")
UserInputService.InputBegan:Connect(function(input, gameProcessedEvent)
if input.KeyCode == Enum.KeyCode.M and not gameProcessedEvent then
imageLabel.Visible = true
end
end)
If you're having problems just reply and you'll get a response within 2 hours.
1 comment
Thank U so much it worked!!!