this script is placed into playerer characters (most comments were made to myself)

note that the script is indeed shortened, but returns the same error as it does in its full length; if it is simply due to too many or too few ends, i may end up asking similar questions in the future due to other cross-language mishaps

the script is intended to perform animations on players with certain buttons; this works perfectly fine, however

error is ServerSide:165: unexpected symbol near ')'

local player = game.Players:GetPlayerFromCharacter(script.Parent.Parent)
local anim = nil

script.KeyPressed.OnServerEvent:connect(function(player,presstype,byte,mouse)
	if presstype == "Up" then
		if byte == 48 then --shift
			--cut out for space
		end
	else if presstype == "Down" then
		if byte == 32 then --space
			--cut out for space
		else if byte == 48 then --shift, 50 for ctrl
			--cut out for space
		byte = string.lower(byte)
		else if byte == 99 then --crouch, c
			--cut out for space
		else if byte == 98 then --covering, b
			--cut out for space
		else if byte == 110 then --kneeling, n
			--cut out for space
		else if byte == 118 then --pronated, v
			--cut out for space
		end
	end
end)