I was trying to do a test where, if I press the right key, it changes the image. For some reason the image turns invisible when I press right on my keyboard. Here is the script:
local UIS = game:GetService('UserInputService') local player = game.Players.LocalPlayer local Main = script.Parent.Main UIS.InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.Right then Main.Right.Image = 6654067570 end end)
I checked the Output bar, but no errors were shown. Help would be much appreciated!
Here is the actual image that I'm changing as well to prove that it is a correctly typed image:
Nevermind, I figured out:
UIS.InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.Right then Main.Right.Image = 'http://www.roblox.com/asset/?id=6654067556' end end)
This is the code that I actually have to type