function onKeyPress(inputObject, gameProcessedEvent) if inputObject.KeyCode == Enum.KeyCode.Q then workspace.Pet.Decal.Texture = "rbxassetid://"..script.Parent.Text end end game:GetService("UserInputService").InputBegan:connect(onKeyPress)
when you insert a decal ID it should show up on the brick, but this won't work. Any help?
Error message 17:51:07.382 - Image "rbxassetid://68437732" failed to load in "Workspace.Pet.Decal.Texture": Failed to resolve texture format
When using decals, be sure you subtract 1 from the ID. If it still does not work, keep subtracting, as sometimes the IDs can end up a couple apart.
Also do note that I recommend adding an if statement to ensure gameProcessedEvent
is false so it doesn't pick up chat input.
Example:
function onKeyPress(inputObject, gameProcessedEvent) if inputObject.KeyCode == Enum.KeyCode.Q and gameProcessedEvent == false then workspace.Pet.Decal.Texture = "rbxassetid://"..script.Parent.Text end end game:GetService("UserInputService").InputBegan:connect(onKeyPress)