repeat wait() until game.Workspace:FindFirstChild(game.Players.LocalPlayer.Name)
local UIS = game:GetService("UserInputService")
local jumped = false
local player = game.Players.LocalPlayer
local char = game.Workspace[player.Name]
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)
I'm trying to make it so when a player jumps their head color temporarily turns to blue and then back to ogColor (their original body color before jump), it doesn't seem to be working, what have I done wrong or what do I need to do? Thanks.

1 comment
have you checked for errors in your output? i'm thinking it could be an issue with the script loading faster than the player.