I have a Billboard GUI, and I want to make it so when the key E is pressed the billboardgui's imageabel will change, I came up with a script and it doesn't work, can anyone help?
my script:
script.parent.mouse.KeyDown:connect(function(key) if key == "e" then script.Parent.Image = imageAsset1 wait(.15) script.Parent.Image = imageAsset2 wait(.25) script.Parent.Image = imageAsset3 wait(.35) script.Parent.Image = imageAsset1 end)
Maybe at the if key == "e",change it to: if key == Enum.Keycode.E
If the script doesnt work,use this to trigger instead:
game:GetService("UserInputService").InputBegan:Connect(function(input,gpe) if not gpe then if input.KeyCode == Enum.KeyCode.E then --do the image change thing here end end end)
i write this on web so there might be some usual problems