repeat wait() until game.Players.LocalPlayer.Character
local UIS = game:GetService("UserInputService")
local jumped = false
local player = game.Players.LocalPlayer
local char = player.Character
UIS.InputBegan:connect(function(input)
if input.Keycode == Enum.KeyCode.Space and not jumped then
jumped = true
local ogColor = char:FindFirstChild("Head").BrickColor
char:FindFirstChild("Head").BrickColor = BrickColor.new("Bright blue")
wait(0.5)
char:FindFirstChild("Head").BrickColor = BrickColor.new(ogColor)
jumped = false
end
end)
As well as not being sure if this script works, I also get a "attempt to index nil with 'Character'" error in console.
I also would rather have the color change back to the original Player's head color after the jumping animation ends (rather than 0.5 seconds) but am not sure how to implement that.

4 comments
I still get a Players.offgrey.Backpack.Script:1: attempt to index nil with 'Character' error, what could this be caused by?
Hello, I tried out the script and got no error, did you copy it? Another thing is, your "ogColor" does nothing since it would just be bright blue. Making a variable is exactly like writing out something, and since writing out "char:FindFirstChild("Head").BrickColor" would give back bright blue, it does nothing
Oh, Im sorry, you said you got an error with backpack.script? This needs to be a local script, if you want other people to see it you need a remote event but otherwise this NEEDS to be a remote event
Yeah, I made it a Local Script, I would like other users to see it as well, it seems that it still hasn't changed the Head Color to Blue, although the error's gone away, and I thought making the ogColor variable would save the color to where I could set their head back to the normal color from blue after 0.5 seconds.