i have no idea why it isn't working..
game:GetService('UserInputService').InputBegan(function(InputObject, Processed)
if InputObject.KeyCode == Enum.KeyCode.A then
workspace.Hit1.Material = Enum.Material.Neon
end
end)
i have no idea why it isn't working..
game:GetService('UserInputService').InputBegan(function(InputObject, Processed)
if InputObject.KeyCode == Enum.KeyCode.A then
workspace.Hit1.Material = Enum.Material.Neon
end
end)
Here you go! :)
local Input = game:GetService("UserInputService")
Input.InputBegan:connect(function(InputObject,Processed)
if not Processed and InputObject.KeyCode == Enum.KeyCode.A then
game.Workspace.Hit1.Material = Enum.Material.Neon
end
end)
Hey, here’s the right script! Hope it helps :) Accept and upvote if helped, Greatly Appreciated.
local Input = game:GetService("UserInputService")
Input.InputBegan:Connect(function(InputObject,Processed)
if not Processed and InputObject.KeyCode == Enum.KeyCode.A then
game.Workspace.Hit1.Material = Enum.Material.Neon
end
end)
But I already answered his question.
But I already answered his question.
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
Are there any errors in output?
no
try adding a print statement in the if statement, to see if you are actually pressing anything