wait(3);

while true do
	
	if _G["bleeding"] == true then
		local blood_block = game.ServerStorage.Blood:Clone();
		
		local pos = game.Players.LocalPlayer.Character["Left Leg"].Position;
		blood_block.Parent = workspace;
		game.Players.LocalPlayer.Character.Humanoid:TakeDamage(1);
		blood_block.Position = pos;
		game.Debris:AddItem(blood_block, 4);
		
		if game.Players.LocalPlayer.Character.Humanoid.Health <= 0 then
			_G["bleeding"] = false;
		end
		
	end
	wait(0.5);
end

Why does this only work in studio, and not in-game from the roblox browser? Ever other script works?